Exemplo n.º 1
0
    void ShootBasicProjectiles()
    {
        GameObject proj = Instantiate(gravity_proj, firingPositions[0], transform.rotation);

        StandardFireFunctions.FireRight(proj, 60);
        proj = Instantiate(gravity_proj, firingPositions[1], transform.rotation);
        StandardFireFunctions.FireLeft(proj, 60);
        proj = Instantiate(gravity_proj, firingPositions[2], transform.rotation);
        StandardFireFunctions.FireVeticallyDegreeOffset(proj, 10);
        proj = Instantiate(gravity_proj, firingPositions[2], transform.rotation);
        StandardFireFunctions.FireVeticallyDegreeOffset(proj, -10);
    }
Exemplo n.º 2
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);
    }