Difference between revisions of "DisplayState"
(Initial page, includes API information and categories) |
(updated categories) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | This class derives from the [[FSMState]] class to allow an easy way to hook the current state of an [[FSMSystem]] to a particular display. This class calls into the [[ | + | This class derives from the [[FSMState]] class to allow an easy way to hook the current state of an [[FSMSystem]] to a particular display. This class calls into the [[DisplayStateManager]] attached to the npc object of the FSMSystem, and sets the current state to the string value of the StateID of the current FSMState. |
== Events == | == Events == | ||
Line 14: | Line 14: | ||
[[Category:API]] | [[Category:API]] | ||
− | [[Category: | + | [[Category:Integration Scripts]] |
[[Category:State Machines]] | [[Category:State Machines]] |
Latest revision as of 02:15, 23 April 2013
This class derives from the FSMState class to allow an easy way to hook the current state of an FSMSystem to a particular display. This class calls into the DisplayStateManager attached to the npc object of the FSMSystem, and sets the current state to the string value of the StateID of the current FSMState.
Contents |
[edit] Events
When the display state is set, an event with this function signature is called:
public delegate void DisplayStateWasSet (GameObject player, GameObject npc);
[edit] event DisplayStateWasSet displayStateSetCallback
This is called every time this state updates the display state in the DisplayStateManager.
[edit] Public Functions
[edit] void OkayToAdvanceNow ()
This sets a flag in the class that indicates that the class is finished displaying, and can advance to the next state. Once this becomes true, DoDefaultTransition is called.
[edit] Abstract Functions
[edit] void DoDefaultTransition ()
This must be implemented in classes that derive from DisplayState. It should advance to the next state in the FSMSystem.