dremerbuik / gamekit

Automatically exported from code.google.com/p/gamekit
0 stars 0 forks source link

Statemachine's start/end-trigger are not called when setting the state manually #225

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a gkFSM-class
2. add 2 states and add a start-trigger
3. set start-state: setState(startState)
4) set another-state: setState(nextState)

What is the expected output? What do you see instead?
setting the state should fire the endTrigger of the current state and the 
startTrigger of the upcoming state

Original issue reported on code.google.com by thomas.t...@googlemail.com on 13 Apr 2012 at 8:38

GoogleCodeExporter commented 9 years ago
Fixed that.

Now the setState-method looks like this:
void setState(int state, bool useTriggers = true);

As default the triggers are fired but if you want to avoid it you can do this 
by specifying the 2nd parameter.

(see http://code.google.com/p/gamekit/source/detail?r=1067 )

Original comment by thomas.t...@googlemail.com on 13 Apr 2012 at 9:06