Class PlantComponent<T1, T2, T3, T4>
Related to:SoyWar.SimplePlantGrowth
/
Inherits from:objectObjectComponentBehaviourMonoBehaviour
/
Implemented in:SoyWar.SimplePlantGrowth.dll
Implements interfaces:IPlantComponent
Syntax
[DisallowMultipleComponent]
public abstract class PlantComponent<T1, T2, T3, T4> : MonoBehaviour, IPlantComponent where T1 : PlantAsset<T1> where T2 : unmanaged, IEquatable<T2> where T3 : unmanaged, IEquatable<T3>, IComparable<T3> where T4 : struct, IPlantData<T1>Type Parameters
| Name | Description |
|---|---|
| T1 | Asset |
| T2 | Index/Position |
| T3 | Data (Including the time to growth to the next phase) |
| T4 | Asset Data |
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 |
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. |
Inherited Members
Properties
| Name | Description |
|---|---|
| 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 |
|---|---|
| GetTime() | Time value used to determine the growth timestamp. |
| GrowAll() | Grows all plants manually. |
| GrowAllAsync() | Grows all plants manually. |
