Beispiel #1
0
        public static Ship ActivateShip()
        {
            ShipMan pShipMan = ShipMan.PrivInstance();

            Debug.Assert(pShipMan != null);

            // copy over safe copy
            Ship pShip = new Ship(GameObject.Name.Ship, GameSprite.Name.Ship, 300, 70);

            ShipMan.Add(pShip);

            // Attach the sprite to the correct sprite batch
            SpriteBatch pSB_Aliens = SpriteBatchMan.Find(SpriteBatch.Name.Aliens);

            pSB_Aliens.Attach(pShip.pProxySprite);

            GameObject pShipRoot = GameObjectMan.Find(GameObject.Name.ShipRoot);

            Debug.Assert(pShipRoot != null);

            // Add to GameObject Tree - {update and collisions}
            pShipRoot.Add(pShip);
            return(pShip);
        }