Class: Gate

Gate()

new Gate()

Source:

Methods

CloseGate()

Close the gate, with sound and animation. The gate may fail to close due to unit obstruction. If this occurs, the gate will start a timer and attempt to close on each simulation update.
Source:

GetPassRange()

Get the range in which units are detected
Source:

Init()

Initialize Gate component
Source:

LockGate()

Lock the gate, with sound. It will close at the next opportunity.
Source:

OnDestroy()

Cleanup on destroy
Source:

OnRangeUpdate()

Called when units enter or leave range
Source:

OpenGate()

Open the gate if unlocked, with sound and animation.
Source:

OperateGate()

Attempt to open or close the gate. An ally must be in range to open the gate, but an unlocked gate will only close if there are no allies in range and no units are inside the gate's obstruction.
Source:

SetupRangeQuery()

Setup the range query to detect units coming in & out of range
Source:

UnlockGate()

Unlock the gate, with sound. May open the gate if allied units are within range. If quiet is true, no sound will be played (used for initial setup).
Source: