Esempio n. 1
0
    IEnumerator Behave(Animator animator)
    {
        if (InputListener.GetKeyUp(KeyCode.K) || time >= maxTime)
        {
            yield return(null);

            animator.SetBool("RuneBoob", false);
            hero.audioCtrler.PlaySound(clip, 0.7f);
            runeBoomInstance.StartSkill();

            if (spellTime == maxSpellTime)
            {
                spellTime = 0;
                StartCdColding();
                hero.statusBox.cdBar.StartCooling(skillIcon, cd);
            }
            //StopAllCoroutines();
        }
        else
        {
            yield return(null);

            time += Time.deltaTime;
            runeBoomInstance.transform.position += speed;
            StartCoroutine(Behave(animator));
        }
    }