Share on facebook
Share on twitter
Share on google

This component organizes the different mechanisms into a single trap and activates them when it is triggered.

Start Mode: Selecting the OnAwake option will automatically activate the trap when the game starts. OnEvent allows you to activate with a TrapTrigger or directly from a script.

Sync: Uncheck this option to set an activation delay for each mechanism.

Mechanism: You can have as many as you want.

You can access the following methods and parameters from code.
bool isActive { get; }        // Returns if the trap is currently active or not.

void Activate()              // Activates the trap if Start Mode is set to OnEvent.
void Deactivate()            // Inactivates the trap.
void Toggle()                // Toggles between active and inactive states. Can only activate if Start Mode is set to OnEvent.