A class in Root.Township, Alta.Populations.
Spawn information that asks an ISpawnPositions source for points by index and caches them.
Constructors
Fields
2 private and internal fields
| Member | What it is |
|---|
private static Logger logger | NLog logger for this class. Unused. |
private Dictionary<int, SpawnPoint> tracked | Cache of points already made, by index. Never cleared. |
Properties
| Member | What it is |
|---|
ISpawnPositions Positions { get; } | The source of spawn positions. |
Methods
| Member | What it is |
|---|
override SpawnPoint GetPoint(int pointIndex) | Returns the cached point for an index, or gets it from Positions and caches it. |
override SpawnPoint GetRandom(PopulationDefinition definition) | Tries up to three random indexes and returns the first free point the definition accepts, or null. Each try adds to the cache. |