public FighterStateMachine( Fighter fighter, float runSpeed ) : base() { Character.Anim.FighterAnimation fighterAnimation = fighter.GetComponent <Character.Anim.FighterAnimation> (); Character.Anim.MoveableAnimation moveableAnimation = fighter.GetComponent <Character.Anim.MoveableAnimation> (); CharacterController characterController = fighter.GetComponent <CharacterController> (); mActionIdle = new ActionIdle((int)eCharacterState.idle, moveableAnimation); mActionAttack = new ActionAttack((int)eCharacterState.attack, fighter); mActionRun = new ActionRun((int)eCharacterState.run, moveableAnimation, fighter.transform, characterController, runSpeed); mActionDie = new ActionDie((int)eCharacterState.die, fighterAnimation); addAction(mActionIdle); addAction(mActionAttack); addAction(mActionRun); addAction(mActionDie); startNewAction((int)eCharacterState.idle, false); }
public ActionAttack(int id, Fighter fighter) : base(id, fighter) { mFighterAnimation = FIGHTER.GetComponent <Character.Anim.FighterAnimation> ();; }
public ActionDie(int id, Character.Anim.FighterAnimation fighterAnimation) : base(id, false) { mFighterAnimation = fighterAnimation; }