Пример #1
0
 public void onClickL()
 {
     LeftArmPunch.SetBool("Attacking", true);
     FireballShot.Play();
     Debug.Log("Левая");
     HeroAnim.SetBool("AttackingLeft", true);
     LeftArm.SetActive(true);
     StartCoroutine("UndoAction");
 }
Пример #2
0
    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);
    }