Class TreeComponent
Related to:SoyWar.SimplePlantGrowth
/
Inherits from:objectObjectComponentBehaviourMonoBehaviourPlantComponent<TreeAsset,int,float,TreeData>
/
Implemented in:SoyWar.SimplePlantGrowth.dll
Implements interfaces:IPlantComponent
Syntax
[AddComponentMenu("Simple Plant Growth/Tree Growth Terrain Manager")]
[DefaultExecutionOrder(-99)]
public sealed class TreeComponent : PlantComponent<TreeAsset, int, float, TreeData>, IPlantComponent
Methods
Name | Description |
---|---|
AddInstances(params int[]) | Tree instances to include from the growth process. |
AddInstancesAsync(params int[]) | Tree instances to include from the growth process. |
RemoveInstances(params int[]) | Tree instances to exclude from the growth process. |
RemoveInstancesAsync(params int[]) | Tree instances to exclude from the growth process. |
Inherited Members
Properties
Name | Description |
---|---|
Data | Data used to manage the plants growth. |
GrownEvent | Event triggered when plant phase changes. |
Locked | Indicates whether the automatic growth operation locks the possibility of using a synchronous operation |
AutoGrowth | Enables the automatic growth. |
Dynamic | Takes into account external modifications made in the terrain. |
InitAuto | Enables automatic tracking of assets existing on the targeted terrain during initialization. |
Override | Allow overriding the default parameters used byManagerComponent. |
Terrain | Terrain |
TimeOffset | Relative time offset to be added to the local time. |
Methods
Name | Description |
---|---|
AddAssets(params T1[]) | Adds plant assets. |
ConvertPrototypesToAssets(IList<int>) | Convert indices prototypes toPlantAsset<T>. |
GetNearestInstance(Vector3) | Nearest index/position of instance from global position |
GetNearestInstanceLocal(Vector3) | Nearest index/position of instance from terrain position |
GrowFromAssets(params T1[]) | Grows all plants associated toPlantAsset<T>manually. |
GrowFromAssetsAsync(params T1[]) | Grows all plants associated toPlantAsset<T>manually. |
GrowFromInstances(params T2[]) | Grows plant instances manually. |
GrowFromInstancesAsync(params T2[]) | Grows plant instances manually. |
GrowFromPrototypes(params int[]) | Grows all plants associated to prototype manually. |
GrowFromPrototypesAsync(params int[]) | Grows all plants associated to prototype manually. |
RemoveAssets(params T1[]) | Remove plant assets. |
GetTime() | Time value used to determine the growth timestamp. |
GrowAll() | Grows all plants manually. |
GrowAllAsync() | Grows all plants manually. |