public void onClickR() { RightArmPunch.SetBool("Attacking", true); FireballShot.Play(); RightArm.SetActive(true); HeroAnim.SetBool("AttackingRight", true); StartCoroutine("UndoAction"); }
IEnumerator UndoAction() { yield return(new WaitForSeconds(0.3f)); Debug.Log("Отключаю"); LeftArm.SetActive(false); RightArm.SetActive(false); LeftArmPunch.SetBool("Attacking", false); RightArmPunch.SetBool("Attacking", false); HeroAnim.SetBool("AttackingRight", false); HeroAnim.SetBool("AttackingLeft", false); }