Class SceneClimbables
The climbables of every loaded scene (Climbables), keyed by scene and filed by horizontal cell, for the climbing movement mode (both peers) and the server's NavMesh links.
public static class SceneClimbables
- Inheritance
-
SceneClimbables
- Inherited Members
Remarks
Keyed by scene, as WaterQuery is: a scene server runs several world scenes, and stacked instances of one, at once, each in its own physics scene. A character asks with its own scene, so it only ever finds the ladders of the world it stands in.
A climbable is its index in its scene's list. Server and client load the same asset, so the index means the same climbable on both, and it is what the reconcile carries (as index + 1; zero for none). The scene's handle differs between the peers and never goes on the wire.
Fields
MaxPerScene
The most climbables a scene may have: the reconcile carries index + 1 in sixteen bits.
public const int MaxPerScene = 65534
Field Value
Properties
Version
Bumped whenever a scene's climbables come or go, so a reader can cache what it found.
public static int Version { get; }
Property Value
Methods
Clear()
Forgets every scene's climbables.
public static void Clear()
Has(Scene)
True when scene has any climbables.
public static bool Has(Scene scene)
Parameters
sceneScene
Returns
Near(Scene, Vector3, float, List<int>)
The indices of scene's climbables whose line passes within reach of
at across the ground (heights are the caller's to judge), ascending. False with none.
public static bool Near(Scene scene, Vector3 at, float reach, List<int> into)
Parameters
Returns
Register(Scene, object, IReadOnlyList<SceneClimbable>)
Offers scene's climbables. A second owner for the same scene replaces the first.
public static void Register(Scene scene, object owner, IReadOnlyList<SceneClimbable> climbables)
Parameters
sceneSceneownerobjectclimbablesIReadOnlyList<SceneClimbable>
TryGet(Scene, int, out SceneClimbable)
The climbable at index in scene, when there is one.
public static bool TryGet(Scene scene, int index, out SceneClimbable climbable)
Parameters
sceneSceneindexintclimbableSceneClimbable
Returns
TryGetAll(Scene, out IReadOnlyList<SceneClimbable>)
Every climbable of scene, by index.
public static bool TryGetAll(Scene scene, out IReadOnlyList<SceneClimbable> climbables)
Parameters
sceneSceneclimbablesIReadOnlyList<SceneClimbable>
Returns
Unregister(Scene, object)
Withdraws scene's climbables, when owner is the one that offered them.
public static void Unregister(Scene scene, object owner)
Parameters
sceneSceneownerobject