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)); }
void ActorBase::StateToStand() { getActorDir(); if (mActorDir == Left) RunAnimateAction_RepeatForever(_action_stand); else RunAnimateAction_RepeatForever(_action_stand_flip); mState = Stand; }
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); } }