Пример #1
0
 public BossHouse(GameScene game, int row, int col)
     : base(game, RECTANGLE, new Vector(col * Settings.BLOCK_WDITH, row * Settings.BLOCK_WDITH), Vector.Zero, INIT_HEALTH)
 {
     attackCount = 120;
     attacking = false;
     openCount = 0;
     if (game.Random.Next(0, 2) == 0)
     {
         enemy = OutEnemy.Byaa;
     }
     else
     {
         enemy = OutEnemy.Nurunuru;
     }
     numDeathTicks = 0;
 }
Пример #2
0
 public BossHouse(GameScene game, int row, int col)
     : base(game, RECTANGLE, new Vector(col * Settings.BLOCK_WDITH, row * Settings.BLOCK_WDITH), Vector.Zero, INIT_HEALTH)
 {
     attackCount = 120;
     attacking   = false;
     openCount   = 0;
     if (game.Random.Next(0, 2) == 0)
     {
         enemy = OutEnemy.Byaa;
     }
     else
     {
         enemy = OutEnemy.Nurunuru;
     }
     numDeathTicks = 0;
 }
Пример #3
0
        public override void Tick(GameInput input)
        {
            if (health <= 0)
            {
                DeathTick(input);
                base.Tick(input);
                return;
            }

            if (attackCount > 0)
            {
                attackCount--;
            }

            if (attackCount == 0 && !attacking && game.Enemies.Count < 6)
            {
                attacking = true;
                if (game.Random.Next(0, 2) == 0)
                {
                    enemy = OutEnemy.Byaa;
                }
                else
                {
                    enemy = OutEnemy.Nurunuru;
                }
            }

            if (attacking)
            {
                if (openCount < 256)
                {
                    if (openCount == 0)
                    {
                        game.PlaySound(GameSound.RobotJump);
                        game.PlaySound(GameSound.Hi2);
                    }
                    if (openCount == 248)
                    {
                        game.PlaySound(GameSound.DoorClose);
                    }
                    openCount++;
                }
                if (openCount == 128)
                {
                    if (enemy == OutEnemy.Byaa)
                    {
                        game.AddEnemy(new Byaa(game, position + new Vector(64, 0), Byaa.Direction.Left, false));
                    }
                    else if (enemy == OutEnemy.Nurunuru)
                    {
                        game.AddEnemy(new Nurunuru(game, position + new Vector(64, 0), Nurunuru.Direction.Left, false));
                    }
                }
                if (openCount >= 256)
                {
                    openCount = 0;
                    if (health > 1000)
                    {
                        attackCount = 180;
                    }
                    else
                    {
                        attackCount = 90;
                    }
                    attacking = false;
                }
            }

            /*
             * if (health < 1000 && game.Ticks % 900 == 0)
             * {
             *  game.AddEnemy(new House(game, 1, 1, House.Direction.Right));
             * }
             */

            base.Tick(input);
        }
Пример #4
0
        public override void Tick(GameInput input)
        {
            if (health <= 0)
            {
                DeathTick(input);
                base.Tick(input);
                return;
            }

            if (attackCount > 0)
            {
                attackCount--;
            }

            if (attackCount == 0 && !attacking && game.Enemies.Count < 6)
            {
                attacking = true;
                if (game.Random.Next(0, 2) == 0)
                {
                    enemy = OutEnemy.Byaa;
                }
                else
                {
                    enemy = OutEnemy.Nurunuru;
                }
            }

            if (attacking)
            {
                if (openCount < 256)
                {
                    if (openCount == 0)
                    {
                        game.PlaySound(GameSound.RobotJump);
                        game.PlaySound(GameSound.Hi2);
                    }
                    if (openCount == 248)
                    {
                        game.PlaySound(GameSound.DoorClose);
                    }
                    openCount++;
                }
                if (openCount == 128)
                {
                    if (enemy == OutEnemy.Byaa)
                    {
                        game.AddEnemy(new Byaa(game, position + new Vector(64, 0), Byaa.Direction.Left, false));
                    }
                    else if (enemy == OutEnemy.Nurunuru)
                    {
                        game.AddEnemy(new Nurunuru(game, position + new Vector(64, 0), Nurunuru.Direction.Left, false));
                    }
                }
                if (openCount >= 256)
                {
                    openCount = 0;
                    if (health > 1000)
                    {
                        attackCount = 180;
                    }
                    else
                    {
                        attackCount = 90;
                    }
                    attacking = false;
                }
            }

            /*
            if (health < 1000 && game.Ticks % 900 == 0)
            {
                game.AddEnemy(new House(game, 1, 1, House.Direction.Right));
            }
            */

            base.Tick(input);
        }