Beispiel #1
0
        public void setZTime(ZombieTime mytime)
        {
            zTime = mytime;

            zTimeReset = new ZombieTime(board);
            zTimeReset.reset();
            zTimeReset.setTime(mytime.getTime());
        }
Beispiel #2
0
        public void setLevelState()
        {
            board.setGridPositionOpen(darwin);
            darwin.setGridPosition(21, 20);
            board.setGridPositionOccupied(darwin);

            board.setGridPositionOpen(firstZombie.X, firstZombie.Y);
            firstZombie.setGridPosition(10, 9);
            board.setGridPositionOccupied(firstZombie.X, firstZombie.Y);
            firstZombie.setZombieAlive(true);

            board.setGridPositionOpen(secondZombie.X, secondZombie.Y);
            secondZombie.setGridPosition(12, 9);
            board.setGridPositionOccupied(secondZombie.X, secondZombie.Y);
            secondZombie.setZombieAlive(true);

            board.setGridPositionOpen(thirdZombie.X, thirdZombie.Y);
            thirdZombie.setGridPosition(8, 8);
            board.setGridPositionOccupied(thirdZombie.X, thirdZombie.Y);
            thirdZombie.setZombieAlive(true);

            board.setGridPositionOpen(fourthZombie.X, fourthZombie.Y);
            fourthZombie.setGridPosition(8, 12);
            board.setGridPositionOccupied(fourthZombie.X, fourthZombie.Y);
            fourthZombie.setZombieAlive(true);

            List <Zombie> myZombieList = new List <Zombie>();

            myZombieList.Add(firstZombie);
            myZombieList.Add(secondZombie);
            myZombieList.Add(thirdZombie);
            myZombieList.Add(fourthZombie);
            cannibalZombie.updateListOfZombies(myZombieList);

            board.setGridPositionOpen(cannibalZombie.X, cannibalZombie.Y);
            cannibalZombie.setGridPosition(29, 3);
            board.setGridPositionOccupied(cannibalZombie.X, cannibalZombie.Y);
            cannibalZombie.setZombieAlive(true);

            potion.setGridPosition(3, 3);
            potion.reset();

            zTime.reset();
            zTime.setTime(zTimeReset.getTime());

            darwin.setHuman();
            darwin.setDarwinAlive();
            playDeathSound  = true;
            playSound       = true;
            gameOverCounter = 0;
            gameOver        = false;
            gameWin         = false;

            Keyboard.GetState();
        }
Beispiel #3
0
        /*
         * Start of the level's state.
         */
        public void setLevelState()
        {
            darwin.setHuman();
            board.setGridPositionOpen(darwin);
            darwin.setGridPosition(15, 22);
            board.setGridPositionOccupied(darwin);

            nurseryOne.reset();
            nurseryOne.setGridPosition(1, 1);
            nurseryOne.setSpawnPoint(2, 4);
            board.setGridPositionOccupied(1, 1);
            board.setGridPositionOccupied(1, 2);
            board.setGridPositionOccupied(1, 3);
            board.setGridPositionOccupied(2, 1);
            board.setGridPositionOccupied(2, 2);
            board.setGridPositionOccupied(2, 3);

            nurseryTwo.reset();
            nurseryTwo.setGridPosition(30, 20);
            nurseryTwo.setSpawnPoint(30, 19);
            board.setGridPositionOccupied(30, 20);
            board.setGridPositionOccupied(30, 21);
            board.setGridPositionOccupied(30, 22);
            board.setGridPositionOccupied(31, 20);
            board.setGridPositionOccupied(31, 21);
            board.setGridPositionOccupied(31, 22);


            fatBossZombie.reset();
            fatBossZombie.setGridPosition(15, 4);
            board.setGridPositionOccupied(15, 4);
            board.setGridPositionOccupied(16, 4);
            board.setGridPositionOccupied(17, 4);
            board.setGridPositionOccupied(15, 5);
            board.setGridPositionOccupied(16, 5);
            board.setGridPositionOccupied(17, 5);
            board.setGridPositionOccupied(15, 6);
            board.setGridPositionOccupied(16, 6);
            board.setGridPositionOccupied(17, 6);

            zTime.reset();

            darwin.setDarwinAlive();
            darwin.setHuman();
            playDeathSound  = true;
            gameOverCounter = 0;
            stairs.setGridPosition(14, 1);

            gameOver = false;
            gameWin  = false;

            Keyboard.GetState();
        }
Beispiel #4
0
        private void checkForSwitchToLevelFour()
        {
            if (darwin.isOnTop(secondStair))
            {
                mainGame.setCurLevel(Game1.LevelState.Level4);
                zTime.reset();
                mainGame.setZTimeLevel(zTime, Game1.LevelState.Level4);

                darwin.setHuman();
                gameState.setState(GameState.state.Start);
                gameOver = false;
                gameWin  = false;
            }
        }
Beispiel #5
0
        // for conveniently reseting level
        public void setLevelState()
        {
            gameOver = false;
            gameWin  = false;

            fellDownPit     = false;
            fellDownCounter = 0;

            board.setGridPositionOpen(darwin);
            darwin.setGridPosition(2, 20);

            zTime.reset();

            board.setGridPositionOpen(firstZombie);
            board.setGridPositionOpen(secondZombie);
            board.setGridPositionOpen(thirdZombie);
            board.setGridPositionOpen(fourthZombie);
            board.setGridPositionOpen(fifthZombie);
            board.setGridPositionOpen(sixthZombie);
            board.setGridPositionOpen(brain);
            board.setGridPositionOpen(potion);

            firstZombie.setGridPosition(10, 10);
            board.setGridPositionOccupied(firstZombie.X, firstZombie.Y);
            firstZombie.setZombieAlive(true);

            secondZombie.setGridPosition(10, 16);
            board.setGridPositionOccupied(secondZombie.X, secondZombie.Y);
            secondZombie.setZombieAlive(true);

            thirdZombie.setGridPosition(12, 10);
            board.setGridPositionOccupied(thirdZombie.X, thirdZombie.Y);
            thirdZombie.setZombieAlive(true);

            fourthZombie.setGridPosition(20, 7);
            board.setGridPositionOccupied(fourthZombie.X, fourthZombie.Y);
            fourthZombie.setZombieAlive(true);

            fifthZombie.setGridPosition(22, 10);
            board.setGridPositionOccupied(fifthZombie.X, fifthZombie.Y);
            fifthZombie.setZombieAlive(true);

            sixthZombie.setGridPosition(22, 10);
            board.setGridPositionOccupied(sixthZombie.X, sixthZombie.Y);
            sixthZombie.setZombieAlive(true);

            potion.setGridPosition(25, 4);

            brain.setGridPosition(3, 3);
            brain.setVisible(true);
            board.setGridPositionOccupied(brain.X, brain.Y);

            potion.reset();
            darwin.setHuman();
            darwin.setDarwinAlive();
            playDeathSound = true;
            firstSwitch.turnOn();

            firstSwitch.turnOn();

            Keyboard.GetState();
        }