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