Esempio n. 1
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();
        }
Esempio n. 2
0
        public void setZTime(ZombieTime mytime)
        {
            zTime = mytime;

            zTimeReset = new ZombieTime(board);
            zTimeReset.reset();
            zTimeReset.setTime(mytime.getTime());
        }
Esempio n. 3
0
        private void consumePotion(ZombieTime zTime)
        {
            board.setGridPositionOpen(this);
            isConsumed = true;

            int updateTime = zTime.getTime() - healthReplenished;

            zTime.setTime(updateTime);

            potionSound.Play();
        }