예제 #1
0
    private IEnumerator ActivatedRoutine()
    {
        int numCasts = MaxChainCount;

        for (int i = 0; i < numCasts; i++)
        {
            Fireball f = Instantiate(fireballPrefab);

            f.FireFrom(Aim);

            if (i == numCasts - 1)
            {
                Deactivate();
            }

            float cooldown = FireCooldown;
            yield return(new WaitForSeconds(cooldown));
        }
        Deactivate();
    }