public void PlayAnimation(CSoldierStat.STATE state) { _stat._state = state; switch (state) { case CSoldierStat.STATE.IDLE: _animator.SetBool("Move", false); break; case CSoldierStat.STATE.MOVE: _animator.SetBool("Move", true); break; case CSoldierStat.STATE.ATTACK: break; case CSoldierStat.STATE.DAMAGE: break; case CSoldierStat.STATE.DEATH: if (IsPlayAnimation("Death", 0)) { break; } _animator.SetTrigger("Death"); break; default: break; } }
public void PlayAnimation(CSoldierStat.STATE state) { _stat._state = state; switch (state) { case CSoldierStat.STATE.SHOOT: if (IsPlayAnimation("Shoot", 0)) { break; } _animator.SetTrigger("Shoot"); break; case CSoldierStat.STATE.DEATH: if (IsPlayAnimation("Death", 0)) { break; } _animator.SetTrigger("Death"); break; } }