Skip to main content

SpawnPoint

A class in Root.Township, Alta.Populations.

A position and rotation a population can spawn at, with a free flag and an optional busy-until time.

Constructors​

MemberWhat it is
SpawnPoint(Vector3 position, Quaternion rotation, int index)Creates a SpawnPoint from position, rotation and index.

Fields​

2 private and internal fields
MemberWhat it is
private bool isFreeWhether nothing is assigned to this point. IsFree also needs occupiedUntil to have passed.
private float occupiedUntilReal time until which the point stays taken after its entity died. 0 when not held.

Properties​

MemberWhat it is
int Index { get; private set; }The point's index in its list.
bool IsFree { get; set; }True when marked free and no busy time is running. Setting it clears the busy time.
Vector3 Position { get; private set; }Spawn position.
Quaternion Rotation { get; private set; }Spawn rotation.

Methods​

MemberWhat it is
void MarkOccupiedForDuration(float duration)Marks the point free but busy for a number of seconds; 0 or less makes it free now.

Used in​

Members of other types that take, return or hold a SpawnPoint: