Exemplo n.º 1
0
void ActorBase::StateToDead()
{
   
	currentAnimateActionStop();
     getActorDir();
	if (mActorDir == Left)
		RunAnimateAction_once(_action_dead,callfunc_selector(ActorBase::dealDead));
	else
		RunAnimateAction_once(_action_dead_flip,callfunc_selector(ActorBase::dealDead));
}
Exemplo n.º 2
0
void ActorBase::StateToStand()
{

    getActorDir();
	if (mActorDir == Left)
		RunAnimateAction_RepeatForever(_action_stand);
	else
		RunAnimateAction_RepeatForever(_action_stand_flip);
    mState = Stand;
}
Exemplo n.º 3
0
void ActorBase::StateToRun()
{
    ActorDir lastDir = mActorDir;
    getActorDir();
    if (mState==Run) {
        if (lastDir!=mActorDir)
        {
            if (mActorDir == Left)
                RunAnimateAction_RepeatForever(_action_run);
            else
                RunAnimateAction_RepeatForever(_action_run_flip);
        }
    }else
    {
         mState = Run;
        if (mActorDir == Left)
            RunAnimateAction_RepeatForever(_action_run);
        else
            RunAnimateAction_RepeatForever(_action_run_flip);
    }
   
}