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); } }