Ejemplo n.º 1
0
    //TwoCircleAttack
    IEnumerator AddCircleAttack()
    {
        float             rotationAngle = 0;
        List <GameObject> bullets       = new List <GameObject>();

        for (int i = 0; i < 15; i++)
        {
            rotationAngle += 24;
            bullets.Add(objectsPool.SpawnFromPool("BurstBullet", FirePoint[0].position, Quaternion.AngleAxis(rotationAngle, Vector3.forward)));
        }
        yield return(new WaitForSeconds(2f));

        for (int i = 0; i < bullets.Count; i++)
        {
            if (i == 1)
            {
                BossAudio.PlayOneShot(ShootAudio[4]);
            }
            StartCoroutine(CircleAttack(bullets[i].transform.position));
        }
    }