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.
GetPassRange()
Get the range in which units are detected
Init()
Initialize Gate component
LockGate()
Lock the gate, with sound. It will close at the next opportunity.
OnDestroy()
Cleanup on destroy
OnRangeUpdate()
Called when units enter or leave range
OpenGate()
Open the gate if unlocked, with sound and animation.
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.
SetupRangeQuery()
Setup the range query to detect units coming in & out of range
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).