public void Stunned() { FindObjectOfType <AudioManager>().Play("crowdeath"); StopAllCoroutines(); if (state == CROWSTATE.REPORTING) { transform.position += Vector3.down; } state = CROWSTATE.STUNED; animator.SetBool("Stuned", true); }
IEnumerator flyYouFool() { animator.SetBool("OnGround", false); yield return(new WaitForSeconds(leaveGroundTime)); transform.position += Vector3.up; animator.SetBool("Flying", true); //Orienter if (masterTransform.position.x > transform.position.x) { transform.rotation = Quaternion.Euler(0, 180, 0); } state = CROWSTATE.REPORTING; }