Exemplo n.º 1
0
        public void Initialize()
        {
            gameOverPosition.X = 320;
            gameOverPosition.Y = 130;

            device = graphics.GraphicsDevice;

            gameState = new GameState();

            gameStart = new GameStart(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight);

            board = new GameBoard(new Vector2(33, 25), new Vector2(device.PresentationParameters.BackBufferWidth, device.PresentationParameters.BackBufferHeight));
            darwin = new Darwin(board);

            zTime = new ZombieTime(board);

            nurseryOne = new Nursery(board, darwin);
            nurseryTwo = new Nursery(board, darwin);

            fatBossZombie = new FatBossZombie(15, 4, 19, 14, 4, 3, darwin, board);
            fatBossZombie.resetGapeMode();
            stairs = new Stairs(board);

            walls = setWallsInLevelSix();

            setLevelState();
            gameState.setState(GameState.state.Start);
        }
Exemplo n.º 2
0
        /**
         * checks if babies are in eating range, kills them, modifies health if necessary
         */
        public void checkForBabyDeaths(Nursery nurseryOne, Nursery nurseryTwo)
        {
            foreach (BabyZombie baby in nurseryOne.babies)
            {
                if (canBabyBeEaten(baby) && baby.isZombieAlive())
                {
                    baby.setZombieAlive(false);
                    health--;
                    eatingBaby = true;
                    exploding  = true;
                }
            }

            foreach (BabyZombie baby in nurseryTwo.babies)
            {
                if (canBabyBeEaten(baby) && baby.isZombieAlive())
                {
                    baby.setZombieAlive(false);
                    health--;
                    eatingBaby = true;
                    exploding  = true;
                }
            }
        }
Exemplo n.º 3
0
        /**
         * checks if babies are in eating range, kills them, modifies health if necessary
         */
        public void checkForBabyDeaths(Nursery nurseryOne, Nursery nurseryTwo)
        {
            foreach (BabyZombie baby in nurseryOne.babies)
            {
                if (canBabyBeEaten(baby) && baby.isZombieAlive())
                {
                    baby.setZombieAlive(false);
                    health--;
                    eatingBaby = true;
                    exploding = true;
                }
            }

            foreach (BabyZombie baby in nurseryTwo.babies)
            {
                if (canBabyBeEaten(baby) && baby.isZombieAlive())
                {
                    baby.setZombieAlive(false);
                    health--;
                    eatingBaby = true;
                    exploding = true;
                }
            }
        }