Struct TileTypeId
- Namespace
- MoonBark.GridPlacement.Core.Types
- Assembly
- MoonBark.GridPlacement.Core.dll
Strongly-typed identifier for tile types in the grid placement system. Represents the semantic tile type (e.g., "grass", "water", "stone") separate from scene objects which use PlaceableId.
TileTypeId lives in Core (pure C#) and maps to Godot-specific tile coordinates (TileSetId, SourceId, AtlasCoords) in the moonbark-idle layer via TileTypeMapping.
Data flow: Core ECS: entity.TileTypeId = "grass" (semantic) Godot Layer: TileTypeMapping.Resolve("grass") ? (TileSetId=0, SourceId=0, AtlasCoords=(0,0)) TileMapLayer.SetCell(position, SourceId, AtlasCoords)
public readonly record struct TileTypeId : IEquatable<TileTypeId>
- Implements
- Inherited Members
Constructors
TileTypeId(string)
Strongly-typed identifier for tile types in the grid placement system. Represents the semantic tile type (e.g., "grass", "water", "stone") separate from scene objects which use PlaceableId.
TileTypeId lives in Core (pure C#) and maps to Godot-specific tile coordinates (TileSetId, SourceId, AtlasCoords) in the moonbark-idle layer via TileTypeMapping.
Data flow: Core ECS: entity.TileTypeId = "grass" (semantic) Godot Layer: TileTypeMapping.Resolve("grass") ? (TileSetId=0, SourceId=0, AtlasCoords=(0,0)) TileMapLayer.SetCell(position, SourceId, AtlasCoords)
public TileTypeId(string Value)
Parameters
Valuestring
Fields
None
Represents an invalid/empty tile type.
public static readonly TileTypeId None
Field Value
Properties
HasValue
Checks if this tile type is valid (non-empty).
public bool HasValue { get; }
Property Value
Value
Gets the string value of the tile type ID.
public string Value { get; }
Property Value
Methods
FromString(string)
Creates a TileTypeId from a string.
public static TileTypeId FromString(string value)
Parameters
valuestring
Returns
ToString()
Returns the string representation of the tile type ID.
public override string ToString()
Returns
Operators
implicit operator string(TileTypeId)
Implicit conversion from TileTypeId to string.
public static implicit operator string(TileTypeId id)
Parameters
idTileTypeId
Returns
implicit operator TileTypeId(string)
Implicit conversion from string to TileTypeId.
public static implicit operator TileTypeId(string value)
Parameters
valuestring