Show / Hide Table of Contents

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
Implements
IStartupWorldLayerPuller
IWorldLayerPuller
IWorldLayerRelationship
Namespace: Eco.Simulation.WorldLayers.Pullers
Assembly: Eco.Simulation.dll
Syntax
public class PlantPopulationPuller : Object, IStartupWorldLayerPuller, IWorldLayerPuller, IWorldLayerRelationship

Constructors

PlantPopulationPuller(WorldLayer, PlantSpecies)

Declaration
public PlantPopulationPuller(WorldLayer outputLayer, PlantSpecies species)
Parameters
Type Name Description
WorldLayer outputLayer
PlantSpecies species

Properties

DescribeGeneral

Declaration
public string DescribeGeneral { get; }
Property Value
Type Description
System.String

OutputLayer

Declaration
public WorldLayer OutputLayer { get; }
Property Value
Type Description
WorldLayer

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
Type Name Description
WorldArea area
Returns
Type Description
System.Single

ApplyDestructive(WorldArea)

Declaration
public float ApplyDestructive(WorldArea area)
Parameters
Type Name Description
WorldArea area
Returns
Type Description
System.Single

DescribeParameterized(WorldArea)

Declaration
public string DescribeParameterized(WorldArea area)
Parameters
Type Name Description
WorldArea area
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
Type Name Description
Vector2i layerPos
WorldArea area
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
Type Name Description
WorldArea area
Returns
Type Description
System.Int32

RemovePlant(Plant)

Declaration
public void RemovePlant(Plant plant)
Parameters
Type Name Description
Plant plant

Implements

IStartupWorldLayerPuller
IWorldLayerPuller
IWorldLayerRelationship
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾