public void onClickL() { LeftArmPunch.SetBool("Attacking", true); FireballShot.Play(); Debug.Log("Левая"); HeroAnim.SetBool("AttackingLeft", true); LeftArm.SetActive(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); }