Exemplo n.º 1
0
        public override void ActivateAbility(float param)
        {
            //Calculate bomb spawn offset
            mBulletOffsets[0].Y = -65 * -(float)Math.Cos(aaTargetShip.mRotation);
            mBulletOffsets[0].X = -65 * (float)Math.Sin(aaTargetShip.mRotation);
            mBulletOffsets[1].Y = 65 * -(float)Math.Cos(aaTargetShip.mRotation);
            mBulletOffsets[1].X = 65 * (float)Math.Sin(aaTargetShip.mRotation);

            Ship Bomber1 = new Ship(aaTargetShip.aaGameWorld, "Bomb_Ship", Constants.ENEMY_TEAM, aaTargetShip.mXPos + mBulletOffsets[0].X, aaTargetShip.mYPos + mBulletOffsets[0].Y, KitManager.BombShipKit);
            Ship Bomber2 = new Ship(aaTargetShip.aaGameWorld, "Bomb_Ship", Constants.ENEMY_TEAM, aaTargetShip.mXPos + mBulletOffsets[1].X, aaTargetShip.mYPos + mBulletOffsets[1].Y, KitManager.BombShipKit);

            Bomber1.mRotation = aaTargetShip.mRotation;
            Bomber1.ApplyForce(100, aaTargetShip.mRotation);
            Bomber2.mRotation = aaTargetShip.mRotation;
            Bomber2.ApplyForce(100, aaTargetShip.mRotation);
            aaTargetShip.aaGameWorld.mToSpawnEntityList.Add(Bomber1);
            aaTargetShip.aaGameWorld.mToSpawnEntityList.Add(Bomber2);
        }