コード例 #1
0
ファイル: PlayerShip.cs プロジェクト: slicedpan/SpaceInvaders
        void Fire()
        {
            if (_creationList != null)
            {
                Bullet bullet = new Bullet();
                bullet.ownerID = ID;
                bullet.color = this.color;
                bullet.Place(this.Position + new Vector2(0.0f, -14.0f));
                bullet.Velocity = new Vector2(0.0f, -20.0f);
                _creationList.Add(bullet);

            }
        }
コード例 #2
0
ファイル: EnemyShip.cs プロジェクト: slicedpan/SpaceInvaders
 void Fire()
 {
     if (_createList != null)
     {
         var bullet = new Bullet();
         bullet.ownerID = ID;
         bullet.isDown = true;
         bullet.color = this.color;
         bullet.Place(_position + new Vector2(0.0f, 18.0f));
         bullet.Velocity = new Vector2(0.0f, 20.0f);
         _createList.Add(bullet);
     }
 }