Skip to main content

EnterLocomotionCheck

A class in Root.Township, the global namespace.

Locomotion modifier check that runs a list of actions when a smooth-locomotion player enters or leaves its area, and can block teleporting in.

Constructors​

MemberWhat it is
EnterLocomotionCheck()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

2 private and internal fields
MemberWhat it is
private LocomotionModifierAction[] actionsActions to begin on enter and finish on leave.
private bool canTeleportInWhether players may teleport into the area.

Methods​

MemberWhat it is
override void Enter(SmoothLocomotionPlayerController player, Bounds bounds)Begins every action on the player.
override bool IsValidTeleportationPosition(Vector3 position, PlayerController player, Bounds bounds)Returns canTeleportIn.
override void Leave(SmoothLocomotionPlayerController player, Bounds bounds)Finishes every action on the player.