Share on facebook
Share on twitter
Share on google

These components control different visual or audio effects. You can add them to the list on the Trap Mechanism components.

Delay: a seconds after the command actually happens on the effect handler.

Methods you can call with the commands in the mechanism or directly from code. Not all are available for every handler.

void PlayOnce()  // Only plays the effect once.
void Play()      // Start playing the effect indefinitely
void Pause()     // Paused the effect. When the play called, it resumes.
void Stop()      // Stops the effect and resets it

This component controls the Audio Source on the same object. As a parameter, it requires an audio clip. All the commands are available.

This component has two modes. 

  • Normal: controls the assigned particle system
  • Instantiate: spawns a particle instance from the prefab

Every command is available for normal mode, but you can only use PlayOnce in case of Instantiate.

Our approach with this component is to extend the usability of the asset. If none of the above effect handlers suits your needs, and you don’t want to or can’t code your own one, this script could be a great help.