Class RescuePoints
Reads the places a character can be rescued to out of a scene's cached details.
public static class RescuePoints
- Inheritance
-
RescuePoints
- Inherited Members
Remarks
Pure: no scene, no network, no character. Both the game master rescue and the player's own unstuck resolve through here, so "nearest respawn point" means one thing in both.
The scene's own details only. Every point comes from the details of the scene the caller passes, which is the scene the character is physically in. A point from another scene written into this one is valid coordinates in a place the character is not loaded into, and reads to the player as falling through the world — the thing a rescue exists to fix.
Fields
KindWords
The words an operator types for each kind, in RescuePointKind order.
public static readonly string[] KindWords
Field Value
- string[]
Methods
List(WorldSceneDetails, RescuePointKind)
Every point of a kind in the scene, in authored order. Never null.
public static List<RescuePoint> List(WorldSceneDetails details, RescuePointKind kind)
Parameters
detailsWorldSceneDetailskindRescuePointKind
Returns
TryFind(WorldSceneDetails, RescuePointKind, string, Vector3, out RescuePoint)
Finds a point of a kind: the named one, or the nearest to from when no
name is given.
public static bool TryFind(WorldSceneDetails details, RescuePointKind kind, string name, Vector3 from, out RescuePoint point)
Parameters
detailsWorldSceneDetailsThe details of the scene the character is in.
kindRescuePointKindWhich kind of point.
namestringThe point's name, or null/blank for the nearest.
fromVector3The character's position, for the nearest.
pointRescuePointThe point found.
Returns
Remarks
A name matches exactly, ignoring case. A waypoint also matches by its authored index, so an operator reading the index off the map can type it. There is deliberately no prefix or "closest spelling" match: a rescue that silently picks a different place than the one typed puts a player somewhere the operator did not intend and cannot see.
TryParseKind(string, out RescuePointKind)
Parses a kind word, case-insensitively.
public static bool TryParseKind(string word, out RescuePointKind kind)
Parameters
wordstringkindRescuePointKind