Difference between revisions of "DisplayStateListener"

From Headbone Creative
Jump to: navigation, search
(Initial page, includes API information and categories)
 

Latest revision as of 22:54, 15 April 2013

This script listens for updates from the DisplayStateManager class. It is designed to be a general purpose listener; it doesn't really do much by itself, except for receive notifications. However, when used in conjunction with other scripts like DisplayStateActivateOnChanged, it becomes quite useful indeed.

Contents

[edit] Public Variables

[edit] stateMachineID : string

This is actually hidden in the inspector, but the custom editor interface allows the game designer to choose which DisplayStateManager this will be set to from a drop-down box.

[edit] Events

This script uses a delegate function to notify other scripts that the state has changed. The delegate has this function signature:

  public delegate void NotifyStateChanged (string newState);

[edit] event NotifyStateChanged OnStateChanged

This is called when the display state is updated.

[edit] Public Functions

[edit] void StateChanged (string stateMachine, string newState)

This is called from a DisplayStateManager. It will call OnStateChanged with the new state if the stateMachine passed into this function matches the stateMachineID of this listener.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox