예제 #1
0
        private static void RecreateAlienGridColumn(Composite pCol, float x, float yStart, float yDelta = -40.0f)
        {
            GhostManager       pGhostManager       = GameStateManager.GetGame().GetStateGhostManager();
            GameObjectManager  pGameObjectManager  = GameStateManager.GetGame().GetStateGameObjectManager();
            SpriteBatchManager pSpriteBatchManager = GameStateManager.GetGame().GetStateSpriteBatchManager();

            pCol.ActivateSprite(pSpriteBatchManager.Find(SpriteBatch.Name.Alien));
            pCol.ActivateCollisionSprite(pSpriteBatchManager.Find(SpriteBatch.Name.CollisionBox));
            pCol.GetCollisionObject().GetCollisionSpriteBox().SetLineColor(1.0f, 1.0f, 1.0f);

            AlienFactory pAlienFactory = new AlienFactory(SpriteBatch.Name.Alien, SpriteBatch.Name.CollisionBox, pCol);

            pAlienFactory.Recreate(Alien.Type.Squid, x, yStart);
            pAlienFactory.Recreate(Alien.Type.Crab, x, yStart + (yDelta));
            pAlienFactory.Recreate(Alien.Type.Crab, x, yStart + (yDelta * 2));
            pAlienFactory.Recreate(Alien.Type.JellyFish, x, yStart + (yDelta * 3));
            pAlienFactory.Recreate(Alien.Type.JellyFish, x, yStart + (yDelta * 4));
        }