Page 1 of 1

[Beye] CurrentStep.

Posted: 17 April 2013, 21:35
by Rudolf
Hello;
I know that I can use possibleAction with this.checkAction and check the statename in OnEnteringState, because StateName is a parameter.
But, in Game.JS, Is there any mean to get the StateName (with a function) , outside EnteringState and OnLivingState (In my Click method for example)?
My first Idea was to put a global 'StateName' in Game.Js... But I suppose that OnEnteringState is not Launched on a refresh?
regards.
Rudolf

Re: [Beye] CurrentStep.

Posted: 18 April 2013, 07:50
by sourisdudesert
Hello,

onEnteringState is launched during a refresh, because this is the initialization of a game state. When you put something here, you're sure the code will be executed when the game state is active.

Cheers,

Re: [Beye] CurrentStep.

Posted: 18 April 2013, 22:18
by Rudolf
Thanks :), but is there any function available for that?