public override IActorState toNextState(EFSMAction action) { IActorState result = null; if(action == EFSMAction.HERO_IDLE){ result = new HeroActorState_Idle(actor); }else if(action == EFSMAction.HERO_DIE){ result = new HeroActorState_Dead(actor); }else if(action == EFSMAction.HERO_RUN){ result = new HeroActorState_Run(actor); } return result; }
public override IActorState toNextState(EActorAction action) { IActorState result = null; if (action == EActorAction.HERO_RUN) { result = new HeroActorState_Run(actor); } else if (action == EActorAction.HERO_ONAIR_DOWN) { result = new HeroActorState_OnAir_Down(actor); } else if (action == EActorAction.HERO_ONAIR_UP) { result = new HeroActorState_OnAir_Up(actor); } else if (action == EActorAction.HERO_ATTACK) { result = new HeroActorState_Attack(actor); } return(result); }
public override IActorState toNextState(EFSMAction action) { IActorState result = null; if(action == EFSMAction.HERO_RUN){ result = new HeroActorState_Run(actor); }else if(action == EFSMAction.HERO_ONAIR_DOWN){ result = new HeroActorState_OnAir_Down(actor); }else if(action == EFSMAction.HERO_ONAIR_UP){ result = new HeroActorState_OnAir_Up(actor); } return result; }
public override IActorState toNextState(EFSMAction action) { IActorState result = null; if(action == EFSMAction.HERO_RUN){ result = new HeroActorState_Run(actor); } return result; }