Example #1
0
    IEnumerator SwarmFire()
    {
        while (true)
        {
            // homing shot
            for (int i = 0; i < 6; i++)
            {
                GameObject projectile = Instantiate(bullet, transform.position, transform.rotation);
                StandardFireFunctions.FireAtPlayer(projectile);

                yield return(new WaitForSeconds(3.0f));
            }

            yield return(new WaitForSeconds(1.0f));

            // electric fields
            for (int i = 0; i < 4; i++)
            {
                Vector3 electricPosition = new Vector3(player.transform.position.x, player.transform.position.y, -1);
                Instantiate(electricity, electricPosition, transform.rotation);

                yield return(new WaitForSeconds(3.0f));
            }
        }
    }
Example #2
0
 IEnumerator FirstSpread()
 {
     StandardFireFunctions.FireAtPlayer(Instantiate(bullet, transform.position, transform.rotation));
     StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(bullet, transform.position, transform.rotation), firstSpreadDegree);
     StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(bullet, transform.position, transform.rotation), -firstSpreadDegree);
     yield return(null);
 }
Example #3
0
 void Overload()
 {
     Instantiate(homingBall, transform.position, transform.rotation);
     StandardFireFunctions.FireAtPlayer(Instantiate(eyeshot, transform.position, transform.rotation));
     StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(eyeshot, transform.position, transform.rotation), 20);
     StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(eyeshot, transform.position, transform.rotation), -20);
 }
Example #4
0
    IEnumerator Shoot()
    {
        GameObject proj = Instantiate(bullet, transform.position, transform.rotation);

        StandardFireFunctions.FireAtPlayer(proj);

        yield return(null);
    }
Example #5
0
    IEnumerator shootPhoton()
    {
        GameObject proj = Instantiate(photonShot, projectileSpawnPos, transform.rotation);

        StandardFireFunctions.FireAtPlayer(proj);
        yield return(new WaitForSeconds(2.5f));

        newAttack = true;
        yield return(new WaitForSeconds(0.5f));
    }
Example #6
0
    IEnumerator shootSpread()
    {
        StandardFireFunctions.FireAtPlayer(Instantiate(projectile, projectileSpawnPos, transform.rotation));
        StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(projectile, projectileSpawnPos, transform.rotation), firstSpreadDegree);
        StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(projectile, projectileSpawnPos, transform.rotation), -firstSpreadDegree);
        yield return(new WaitForSeconds(1.5f));

        StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(projectile, projectileSpawnPos, transform.rotation), secondSpreadDegree);
        StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(projectile, projectileSpawnPos, transform.rotation), -secondSpreadDegree);
        yield return(new WaitForSeconds(1.0f));

        newAttack = true;
    }
Example #7
0
 void Shoot()
 {
     if ((typeCount / 60) % 2 == 0)
     {
         StandardFireFunctions.FireAtPlayer(Instantiate(bullet, transform.position, transform.rotation));
         StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(bullet, transform.position, transform.rotation), 20);
         StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(bullet, transform.position, transform.rotation), -20);
     }
     else
     {
         StandardFireFunctions.FireAtPlayer(Instantiate(bullet, transform.position, transform.rotation));
     }
 }
Example #8
0
    IEnumerator Shoot()
    {
        firing = true;
        GameObject proj = Instantiate(bullet, transform.position, transform.rotation);

        StandardFireFunctions.FireAtPlayer(proj);
        yield return(new WaitForSeconds(0.8f));

        proj = Instantiate(bullet, transform.position, transform.rotation);
        StandardFireFunctions.FireDegreeOffsetFromPlayer(proj, 8);
        yield return(new WaitForSeconds(0.8f));

        proj = Instantiate(bullet, transform.position, transform.rotation);
        StandardFireFunctions.FireDegreeOffsetFromPlayer(proj, -8);
        yield return(new WaitForSeconds(2.5f));

        firing = false;
    }
Example #9
0
    public void shootStream()
    {
        GameObject proj = Instantiate(projectile, projectileSpawnPos, transform.rotation);

        StandardFireFunctions.FireAtPlayer(proj);
    }
Example #10
0
 void Shoot()
 {
     StandardFireFunctions.FireAtPlayer(Instantiate(bullet, transform.position, transform.rotation));
     StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(bullet, transform.position, transform.rotation), 20);
     StandardFireFunctions.FireDegreeOffsetFromPlayer(Instantiate(bullet, transform.position, transform.rotation), -20);
 }
Example #11
0
    void Shoot()
    {
        GameObject proj = Instantiate(bullet, transform.position, transform.rotation);

        StandardFireFunctions.FireAtPlayer(proj);
    }