First of all, I am a greenhorn in coding and unity! So please excuse my newbie question!
Im working on a 2D gamescene, where a handful of possible actions should only become enabled (or unlocked) when I activate another defined action in that scene first (kind of on/off switch, but without the "off" or "back" function).
To be more precise, my scene is set in a room where, once you turn off the light, certain new animated active objects become visible, or appear and can be activated by clicking them . Also some objects that are visible and active from the beginning of the scene, should play different animations/sounds, once the light is turned off.
I need a script for the on/off switch, which manages the state of several objects being active(if on) or inactive (if off)
Somehow I couldnt find any help on my odyssey through the forums and the web yet... Thanks a lot in advance for all your brilliant answers and solutions!
Use a script that has:
When the switch is activated:
A Controllable would just be this:
Your other classes would inherit from that:
answered Jun 05 '12 at 06:23 PM