Game.Prefabs.MarkerType
Assembly: Assembly-CSharp
Namespace: Game.Prefabs
Type: enum
Base: System.Enum (underlying type: System.Int32)
Summary:
MarkerType is an enumeration used to identify the purpose of a prefab marker inside the game. It covers a sentinel value (None) and a set of marker types representing creature spawners and various kinds of outside-connections (road, train, ship, airplane, electricity, water pipe). None is explicitly set to -1 and is commonly used to indicate "no marker" or an uninitialized value.
Fields
-
None = -1
Represents no marker / unassigned marker. Use this to check for absence of a valid marker. -
CreatureSpawner
Marker for a creature spawner prefab (wildlife or similar spawn points). -
RoadOutsideConnection
Marker used to denote a road connection to the outside/world edge (connects city road network to external roads). -
TrainOutsideConnection
Marker used for train/rail outside connections (rail network linking to outside). -
ShipOutsideConnection
Marker used for ship/boat/water outside connections (ports/docks connecting to sea/river network). -
AirplaneOutsideConnection
Marker for airplane/airport outside connections (air travel links to outside). -
ElectricityOutsideConnection
Marker for electricity/power outside connections (power grid connection points to outside). -
WaterPipeOutsideConnection
Marker for water pipe outside connections (water supply/sewage connection points to outside).
Properties
- This enum defines no properties.
Constructors
- Enums don't declare explicit constructors. A default implicit constructor exists and values are assigned as listed above.
Methods
- No instance methods are declared here. Standard System.Enum methods (ToString, GetValues, etc.) are available from the base type.
Usage Example
// Example usage of MarkerType
using Game.Prefabs;
public void HandleMarker(MarkerType marker)
{
if (marker == MarkerType.None)
{
// No marker assigned
return;
}
switch (marker)
{
case MarkerType.CreatureSpawner:
// spawn logic
break;
case MarkerType.RoadOutsideConnection:
// connect road to outside
break;
case MarkerType.TrainOutsideConnection:
// connect rail network
break;
case MarkerType.ShipOutsideConnection:
// setup port connection
break;
case MarkerType.AirplaneOutsideConnection:
// setup airport connection
break;
case MarkerType.ElectricityOutsideConnection:
// connect power lines
break;
case MarkerType.WaterPipeOutsideConnection:
// connect water pipes
break;
default:
// handle unknown/added-in-future values
break;
}
}
// Casting from int (example)
int rawValue = -1;
MarkerType m = (MarkerType)rawValue; // yields MarkerType.None