示例#1
0
        // checks if a baby is in front of boss and boss has mouth open
        public bool canBabyBeEaten(BabyZombie baby)
        {
            if ((baby.X == this.X || baby.X == this.X + 1 || baby.X == this.X + 2))
            {
                if (baby.Y == this.Y + 3 && gapeMode && !eatingBaby)
                {
                    return(true);
                }
            }

            return(false);
        }
示例#2
0
        //private Vector2[] spawnPoints;
        public Nursery(GameBoard gb, Darwin darwin)
            : base(gb)
        {
            babies = new BabyZombie[maxBabies];
            /*spawnPoints = new Vector2[10];
            for (int i = 0; i < 10; i++)
            {
                spawnPoints[i] = new Vector2();
            }
            */
            for (int i = 0; i < maxBabies; i++)
            {
                babies[i] = new BabyZombie(0, 0, 32, 0, 24, 0, darwin, gb);

                babies[i].setZombieAlive(false);
            }

            this.setEventLag(babyTimeSpawn);

            this.destination.Height = board.getSquareLength() * 3;
            this.destination.Width = board.getSquareWidth() * 2;
        }
示例#3
0
        //private Vector2[] spawnPoints;

        public Nursery(GameBoard gb, Darwin darwin)
            : base(gb)
        {
            babies = new BabyZombie[maxBabies];

            /*spawnPoints = new Vector2[10];
             * for (int i = 0; i < 10; i++)
             * {
             *  spawnPoints[i] = new Vector2();
             * }
             */
            for (int i = 0; i < maxBabies; i++)
            {
                babies[i] = new BabyZombie(0, 0, 32, 0, 24, 0, darwin, gb);

                babies[i].setZombieAlive(false);
            }

            this.setEventLag(babyTimeSpawn);

            this.destination.Height = board.getSquareLength() * 3;
            this.destination.Width  = board.getSquareWidth() * 2;
        }
示例#4
0
        // checks if a baby is in front of boss and boss has mouth open
        public bool canBabyBeEaten(BabyZombie baby)
        {
            if ((baby.X == this.X || baby.X == this.X + 1 || baby.X == this.X + 2))
            {
                if (baby.Y == this.Y + 3 && gapeMode && !eatingBaby)
                    return true;
            }

            return false;
        }