Esempio n. 1
0
    IEnumerator WaitForUltimateAnimation(GameObject[] enemies)
    {
        yield return(new WaitForSpineEvent(animationState, "OnUltimateFired"));

        Instantiate(Explosion02, boneFollower.transform.position, Quaternion.identity);
        foreach (var enemy in enemies)
        {
            for (int i = 0; i < NumberOfArrowsOnUltimate; i++)
            {
                ArrowScript arrow = instanceController.SpawnSingleArrow();
                if (arrow)
                {
                    Instantiate(UltimateArrow, arrow.transform.position, arrow.transform.rotation, arrow.transform).transform.LookAt(arrow.transform.position + new Vector3(1, 0, 0));
                    arrow.Ultimate(enemy.transform.position, Explosion01);
                }
            }
        }
    }