Table of Contents

Class TerrainData

Namespace
Core.Registries
Assembly
Core.dll

ENGINE LAYER: Generic terrain data. Contains mechanism (color, movement cost, terrain classification). GAME layer extends with policy (defence, supply, attrition) via customData.

public class TerrainData
Inheritance
object
TerrainData

Properties

ColorB

public byte ColorB { get; set; }

Property Value

byte

ColorG

public byte ColorG { get; set; }

Property Value

byte

ColorR

public byte ColorR { get; set; }

Property Value

byte

CustomData

public Dictionary<string, object> CustomData { get; set; }

Property Value

Dictionary<string, object>

IsWater

public bool IsWater { get; set; }

Property Value

bool

MovementCost

public float MovementCost { get; set; }

Property Value

float

Name

public string Name { get; set; }

Property Value

string

TerrainId

public byte TerrainId { get; set; }

Property Value

byte

Methods

GetCustomData<T>(string, T)

public T GetCustomData<T>(string key, T defaultValue = default)

Parameters

key string
defaultValue T

Returns

T

Type Parameters

T

SetCustomData(string, object)

public void SetCustomData(string key, object value)

Parameters

key string
value object