Skip to main content

TeleporterBlock

A static class in Root.Township, the global namespace.

Global switch that turns off the player's teleport while any behaviour is blocking it (for example ClimberActivator). Checked by Teleporter.

Fields​

1 private and internal field
MemberWhat it is
private static HashSet<MonoBehaviour> blockingBehavioursBehaviours currently blocking teleport.

Properties​

MemberWhat it is
static bool IsBlocked { get; private set; }True while at least one behaviour is blocking teleport.

Methods​

MemberWhat it is
static void StartBlocking(MonoBehaviour blockingBehaviour)Adds a behaviour to the blockers and turns blocking on.
static void StopBlocking(MonoBehaviour blockingBehaviour)Removes a behaviour; blocking turns off when none are left.