Otter  0.9.8.91
2d Game Development Framework based on SFML.Net
 All Classes Namespaces Functions Variables Enumerations Properties
Otter.State Class Reference

Used in StateMachine. Contains functions for enter, update, and exit. More...

Public Member Functions

 State (Action onEnter=null, Action onUpdate=null, Action onExit=null)
 Create a new State with three Actions. More...
 
 State (Action onUpdate)
 Create a new State with just an update Action. More...
 
void Functions (Action onEnter, Action onUpdate, Action onExit)
 Set all three of the methods for enter, update, and exit. More...
 
void Update ()
 Call OnUpdate. More...
 
void Enter ()
 Call OnEnter. More...
 
void Exit ()
 Call OnExit. More...
 

Public Attributes

Action OnEnter = delegate { }
 The method to call when entering this state. More...
 
Action OnUpdate = delegate { }
 The method to call when updating this state. More...
 
Action OnExit = delegate { }
 The method to call when exiting this state. More...
 

Properties

int Id [get, set]
 The Id that this state has been assigned. More...
 

Detailed Description

Used in StateMachine. Contains functions for enter, update, and exit.

Constructor & Destructor Documentation

Otter.State.State ( Action  onEnter = null,
Action  onUpdate = null,
Action  onExit = null 
)

Create a new State with three Actions.

Parameters
onEnterThe method to call when entering this state.
onUpdateThe method to call when updating this state.
onExitThe method to call when exiting this state.
Otter.State.State ( Action  onUpdate)

Create a new State with just an update Action.

Parameters
onUpdateThe method to call when updating this state.

Member Function Documentation

void Otter.State.Enter ( )

Call OnEnter.

void Otter.State.Exit ( )

Call OnExit.

void Otter.State.Functions ( Action  onEnter,
Action  onUpdate,
Action  onExit 
)

Set all three of the methods for enter, update, and exit.

Parameters
onEnterThe method to call when entering this state.
onUpdateThe method to call when updating this state.
onExitThe method to call when exiting this state.
void Otter.State.Update ( )

Call OnUpdate.

Member Data Documentation

Action Otter.State.OnEnter = delegate { }

The method to call when entering this state.

Action Otter.State.OnExit = delegate { }

The method to call when exiting this state.

Action Otter.State.OnUpdate = delegate { }

The method to call when updating this state.

Property Documentation

int Otter.State.Id
getset

The Id that this state has been assigned.


The documentation for this class was generated from the following file: