Ejemplo n.º 1
0
    void FireSwirl(int angle)                                                   //I made this take x and y because I was thinking about it and different enemies will need to fire from different parts of their models
    {
        GameObject bulletObject = new GameObject();
        BossBullet bullet       = bulletObject.AddComponent <BossBullet>();

        bullet.init(this);
        bullet.transform.position    = new Vector3(this.transform.position.x, this.transform.position.y, 0);
        bullet.transform.eulerAngles = new Vector3(0, 0, angle);
    }
Ejemplo n.º 2
0
    void FireBullet()                                                   //I made this take x and y because I was thinking about it and different enemies will need to fire from different parts of their models
    {
        GameObject bulletObject = new GameObject();
        BossBullet bullet       = bulletObject.AddComponent <BossBullet>();

        bullet.init(this);
        bullet.transform.position = new Vector3(this.transform.position.x, this.transform.position.y, 0);
        bullet.transform.rotation = new Quaternion(this.transform.rotation.x, this.transform.rotation.y, this.transform.rotation.z, this.transform.rotation.w);
    }
Ejemplo n.º 3
0
 void FireBurst()
 {
     for (int x = 0; x <= 360; x = x + 10)
     {
         GameObject bulletObject = new GameObject();
         BossBullet bullet       = bulletObject.AddComponent <BossBullet>();
         bullet.init(this);
         bullet.transform.position    = new Vector3(this.transform.position.x, this.transform.position.y, 0);
         bullet.transform.eulerAngles = new Vector3(this.transform.position.x, this.transform.position.y, x);
     }
 }