Show / Hide Table of Contents

Class WorldLayerInteraction<TIntermediateDescription>

Models an effect that a set of layers have on another layer, e.g. animals eating plants for food kills plants.

Inheritance
System.Object
WorldLayerInteraction<TIntermediateDescription>
BiomeRater
ExponentialGrowthOrDecay
PlantInteraction<TIntermediateDescription>
PlantNutrientConsumption
ProportionalInteraction
SecondOrderReaction
SpreadInteraction
SumInteraction
Implements
IWorldLayerInteraction
IWorldLayerRelationship
Namespace: Eco.Simulation.WorldLayers
Assembly: Eco.Simulation.dll
Syntax
public abstract class WorldLayerInteraction<TIntermediateDescription> : Object, IWorldLayerInteraction, IWorldLayerRelationship
Type Parameters
Name Description
TIntermediateDescription

Constructors

WorldLayerInteraction()

Declaration
protected WorldLayerInteraction()

Properties

Dependencies

Declaration
public WorldLayer[] Dependencies { get; }
Property Value
Type Description
WorldLayer[]

DependencyLayerNames

Declaration
public abstract string[] DependencyLayerNames { get; }
Property Value
Type Description
System.String[]

DescribeGeneral

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

OutputLayer

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

OutputLayerName

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

PostWorldgenDependencies

Declaration
public WorldLayer[] PostWorldgenDependencies { get; }
Property Value
Type Description
WorldLayer[]

RequiresNeighborhood

Should be set if the interaction requires WorldLayerNeighborInfo for layer values. By default false for optimization purposes.

Declaration
public virtual bool RequiresNeighborhood { get; }
Property Value
Type Description
System.Boolean

WorldInitDependencyLayerNames

Declaration
public abstract string[] WorldInitDependencyLayerNames { get; }
Property Value
Type Description
System.String[]

Methods

Apply(Single, Single[], WorldLayerNeighborInfo[])

Declaration
public abstract float Apply(float currentValue, float[] dependencyValues, WorldLayerNeighborInfo[] neighborValues)
Parameters
Type Name Description
System.Single currentValue
System.Single[] dependencyValues
WorldLayerNeighborInfo[] neighborValues
Returns
Type Description
System.Single

DescribeAggregated(IEnumerable<TIntermediateDescription>)

Declaration
protected abstract string DescribeAggregated(IEnumerable<TIntermediateDescription> intermediateDescriptions)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<TIntermediateDescription> intermediateDescriptions
Returns
Type Description
System.String

DescribeParameterized(WorldArea)

Declaration
public string DescribeParameterized(WorldArea area)
Parameters
Type Name Description
WorldArea area
Returns
Type Description
System.String

DescribeSpecific(Single, Single[], WorldLayerNeighborInfo[])

Declaration
protected abstract TIntermediateDescription DescribeSpecific(float currentValue, float[] dependencyValues, WorldLayerNeighborInfo[] neighborValues)
Parameters
Type Name Description
System.Single currentValue
System.Single[] dependencyValues
WorldLayerNeighborInfo[] neighborValues
Returns
Type Description
TIntermediateDescription

GetDependencyIndexByLayerName(String)

Declaration
protected int GetDependencyIndexByLayerName(string layerName)
Parameters
Type Name Description
System.String layerName
Returns
Type Description
System.Int32

PostWorldgen(Single, Single[], WorldLayerNeighborInfo[])

Declaration
public abstract float PostWorldgen(float currentValue, float[] dependencyValues, WorldLayerNeighborInfo[] neighborValues)
Parameters
Type Name Description
System.Single currentValue
System.Single[] dependencyValues
WorldLayerNeighborInfo[] neighborValues
Returns
Type Description
System.Single

PostWorldgenValueOf(String, Single[])

Declaration
protected float PostWorldgenValueOf(string layerName, float[] dependencyValues)
Parameters
Type Name Description
System.String layerName
System.Single[] dependencyValues
Returns
Type Description
System.Single

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String

ValueOf(String, Single[])

Declaration
protected float ValueOf(string layerName, float[] dependencyValues)
Parameters
Type Name Description
System.String layerName
System.Single[] dependencyValues
Returns
Type Description
System.Single

Verify(List<LocString>)

Declaration
public virtual bool Verify(List<LocString> errors)
Parameters
Type Name Description
System.Collections.Generic.List<LocString> errors
Returns
Type Description
System.Boolean

Implements

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