示例#1
0
    IEnumerator Shoot()
    {
        Vector3 shootLower = new Vector3(transform.position.x, transform.position.y - 5, transform.position.z);

        for (int i = 0; i < bulletsArray.Length; i++)
        {
            bulletsArray[i] = Instantiate(bullet, shootLower, transform.rotation);
        }

        StandardFireFunctions.FireVetically(bulletsArray[0]);
        StandardFireFunctions.FireVeticallyDegreeOffset(bulletsArray[1], FirstDegreeOffset);
        StandardFireFunctions.FireVeticallyDegreeOffset(bulletsArray[2], -FirstDegreeOffset);
        StandardFireFunctions.FireVeticallyDegreeOffset(bulletsArray[3], SecondDegreeOffset);
        StandardFireFunctions.FireVeticallyDegreeOffset(bulletsArray[4], -SecondDegreeOffset);

        yield return(null);
    }