Toggle Objects At Events Observer Object
v1.0
Last updated
v1.0
Last updated
This ObjserverObject
toggles a List
of objects on and off at defined lifecycle events of the Projectile.
By default, the Start and Launch Projectile events are selected for "turn on", and Collision Enter for "turn off".
"Start" will only happen once, and the "Launch Projectile" event will not fire the FIRST time the projectile is launched, only on subsequent times (after returning from the pool). Therefor, having both selected will cover all launch events.
Check out the class. Each event has additional parameters that aren't being used here. You can create a custom class that derives from this, and override the events to make use of the parameters for more interesting logic.