DisplayStateActivateOnChanged
From Headbone Creative
Revision as of 22:45, 15 April 2013 by Tyson Joehler (Talk | contribs)
This is a type of DisplayStateListener that activates or deactivates all of its child objects depending upon the current Display State. Note that the object itself should remain activated at all times; thus it is best to attach this script to an otherwise empty GameObject.
Contents |
Public Variables
activeStates : List<string>
This is a list of all of the display states that will cause the children of the object to be activated.
Public Functions
void HandleStateChanged (string newState)
This is called by the DisplayStateListener whenever the state changes. The new state is passed in as the parameter.
void SetChildrenActive (bool active)
This is called by HandleStateChanged to turn the child objects on or off, depending upon whether or not the state was in the list of activeStates or not.