Class PlantPopulationPuller
Special kind of IStartupWorldLayerPuller which tracks added/removed plants between ticks and apply changes when tick happens. It also sync layer with actual plants count on startup.
Inheritance
System.Object
PlantPopulationPuller
Assembly: Eco.Simulation.dll
Syntax
public class PlantPopulationPuller : Object, IStartupWorldLayerPuller, IWorldLayerPuller, IWorldLayerRelationship
Constructors
PlantPopulationPuller(WorldLayer, PlantSpecies)
Declaration
public PlantPopulationPuller(WorldLayer outputLayer, PlantSpecies species)
Parameters
Properties
DescribeGeneral
Declaration
public string DescribeGeneral { get; }
Property Value
Type |
Description |
System.String |
|
OutputLayer
Declaration
public WorldLayer OutputLayer { get; }
Property Value
OutputLayerName
Declaration
public string OutputLayerName { get; }
Property Value
Type |
Description |
System.String |
|
Methods
AddPlant(Plant)
Declaration
public void AddPlant(Plant plant)
Parameters
Type |
Name |
Description |
Plant |
plant |
|
Apply(WorldArea)
Declaration
public float Apply(WorldArea area)
Parameters
Returns
Type |
Description |
System.Single |
|
ApplyDestructive(WorldArea)
Declaration
public float ApplyDestructive(WorldArea area)
Parameters
Returns
Type |
Description |
System.Single |
|
DescribeParameterized(WorldArea)
Declaration
public string DescribeParameterized(WorldArea area)
Parameters
Returns
Type |
Description |
System.String |
|
GetStartupValue(Vector2i, WorldArea)
On startup ensures world plants count and layer plants count synced.
Declaration
public float GetStartupValue(Vector2i layerPos, WorldArea area)
Parameters
Returns
Type |
Description |
System.Single |
|
PopulationDelta(WorldArea)
Returns population delta for current added/remove plants snapshot. It will be negative value if removed plants more than added and positive otherwise.
Declaration
public int PopulationDelta(WorldArea area)
Parameters
Returns
Type |
Description |
System.Int32 |
|
RemovePlant(Plant)
Declaration
public void RemovePlant(Plant plant)
Parameters
Type |
Name |
Description |
Plant |
plant |
|
Implements