private IEnumerator AttackCo() { FMODUnity.RuntimeManager.PlayOneShot("event:/Actions/SwordAttack"); _animator.SetBool("Attacking", (true)); _currentState = PlayserState.Attack; yield return(null); _animator.SetBool("Attacking", (false)); yield return(new WaitForSeconds(0.3f)); _currentState = PlayserState.Walk; }
void Start() { _currentState = PlayserState.Walk; _animator = GetComponent <Animator>(); _myRigidbody = GetComponent <Rigidbody2D>(); }