Class GrassComponent
Related to:SoyWar.SimplePlantGrowth
/
Inherits from:objectObjectComponentBehaviourMonoBehaviourPlantComponent<GrassAsset,Vector2Int,GrassValue,GrassData>
/
Implemented in:SoyWar.SimplePlantGrowth.dll
Implements interfaces:IPlantComponent
Syntax
[AddComponentMenu("Simple Plant Growth/Grass Growth Terrain Manager")]
[DefaultExecutionOrder(-99)]
public sealed class GrassComponent : PlantComponent<GrassAsset, Vector2Int, GrassValue, GrassData>, IPlantComponent
Methods
Name | Description |
---|---|
AddInstances(GrassAsset, params Vector2Int[]) | Grass instances to include from the growth process withGrassAsset. |
AddInstances(int, params Vector2Int[]) | Grass instances to include from the growth process with the prototype index. |
AddInstancesAsync(GrassAsset, params Vector2Int[]) | Grass instances to include from the growth process withGrassAsset. |
AddInstancesAsync(int, params Vector2Int[]) | Grass instances to include from the growth process with the prototype index. |
GetGlobalPositionInstance(Vector2Int) | Global position of the instance position. |
GetPlotSize() | Plot size |
GrowFromInstances(GrassAsset, params Vector2Int[]) | Grows plant instances associated to theGrassAssetspecified manually. |
GrowFromInstances(IList<GrassAsset>, params Vector2Int[]) | Grows plant instances associated toGrassAssetspecified manually. |
GrowFromInstances(IList<int>, params Vector2Int[]) | Grows plant instances associated to indices prototypes specified manually. |
GrowFromInstances(int, params Vector2Int[]) | Grows plant instances associated to index prototype specified manually. |
GrowFromInstancesAsync(GrassAsset, params Vector2Int[]) | Grows plant instances associated to theGrassAssetspecified manually. |
GrowFromInstancesAsync(IList<GrassAsset>, params Vector2Int[]) | Grows plant instances associated toGrassAssetspecified manually. |
GrowFromInstancesAsync(IList<int>, params Vector2Int[]) | Grows plant instances associated to indices prototypes specified manually. |
GrowFromInstancesAsync(int, params Vector2Int[]) | Grows plant instances associated to index prototype specified manually. |
RemoveInstances(GrassAsset, params Vector2Int[]) | Grass instances to exclude from the growth process withGrassAsset. |
RemoveInstances(int, params Vector2Int[]) | Grass instances to exclude from the growth process with the prototype index. |
RemoveInstancesAsync(GrassAsset, params Vector2Int[]) | Grass instances to exclude from the growth process withGrassAsset. |
RemoveInstancesAsync(int, params Vector2Int[]) | Grass instances to exclude from the growth process with the prototype index. |
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. |