Example #1
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 #2
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 #3
0
 void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         playerHP.TakeDamage();
         jump = true;
         StandardFireFunctions.FireDegreeOffsetFromPlayer(hatcher, 180);
         StartCoroutine(Timer());
     }
 }
Example #4
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 #5
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 #6
0
 void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         playerHP.TakeDamage();
         rotating = true;
         jump     = true;
         StandardFireFunctions.FireDegreeOffsetFromPlayer(hatcher, 180);
         StartCoroutine(Timer());
     }
     if (collision.gameObject.layer == 10 && rotating)   // Layer 10 == Ground
     {
         rotationVector = new Vector3(0, 0, -rotationVector.z);
     }
 }
Example #7
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 #8
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);
 }