Beispiel #1
0
        public override void Tick(GameInput input)
        {
            if (Ticks == 0)
            {
                StopMusic();
            }
            else if (Ticks == 60)
            {
                PlayMusic(GameMusic.Boss1);
            }

            base.Tick(input);

            if (Items.Count == 0 && Ticks % 180 == 90 && (Player.CurrentWeapon == Player.Weapon.Pistol || (Player.CurrentWeapon == Player.Weapon.Rocket && Player.Ammo <= 15) || (Player.CurrentWeapon == Player.Weapon.Machinegun && Player.Ammo <= 50)))
            {
                if (Random.Next(0, 2) == 0)
                {
                    Items.AddThing(new MachinegunItem(this, new Vector(32 + Random.NextDouble() * (Map.Width - 96), 32), Vector.Zero));
                }
                else
                {
                    Items.AddThing(new RocketItem(this, new Vector(32 + Random.NextDouble() * (Map.Width - 96), 32), Vector.Zero));
                }
            }
        }
Beispiel #2
0
        public override void Tick(GameInput input)
        {
            if (Ticks == 0)
            {
                StopMusic();
            }
            else if (Ticks == 60)
            {
                PlayMusic(GameMusic.Boss2);
            }

            base.Tick(input);

            if (Items.Count == 0 && Ticks % 180 == 90 && (Player.CurrentWeapon == Player.Weapon.Pistol || (Player.CurrentWeapon == Player.Weapon.Rocket && Player.Ammo <= 25) || (Player.CurrentWeapon == Player.Weapon.Machinegun && Player.Ammo <= 100) || (oyaji.CurrentState == Oyaji.State.Pattern2_5 && Player.CurrentWeapon == Player.Weapon.Rocket)))
            {
                if (oyaji.CurrentState == Oyaji.State.Pattern2_5 || Random.Next(0, 2) == 0)
                {
                    Items.AddThing(new MachinegunItem(this, new Vector(160 + Random.NextDouble() * (Map.Width - 320 - 32), 32), Vector.Zero));
                }
                else
                {
                    Items.AddThing(new RocketItem(this, new Vector(160 + Random.NextDouble() * (Map.Width - 320 - 32), 32), Vector.Zero));
                }
            }
        }
Beispiel #3
0
        public override void Tick(GameInput input)
        {
            if (Ticks == 0)
            {
                StopMusic();
            }
            else if (Ticks == 60)
            {
                PlayMusic(GameMusic.Boss1);
            }

            base.Tick(input);

            int targetColorCount = 256 - (int)Math.Round(256.0 * (double)(boss.Health - 500) / (double)(initBossHealth - 500));

            if (targetColorCount < 0)
            {
                targetColorCount = 0;
            }
            else if (targetColorCount > 255)
            {
                targetColorCount = 255;
            }
            if (skyColorCount < targetColorCount && Ticks % 4 == 0)
            {
                skyColorCount++;
            }

            if (Items.Count == 0 && Ticks % 180 == 90 && (Player.CurrentWeapon == Player.Weapon.Pistol || (Player.CurrentWeapon == Player.Weapon.Machinegun && Player.Ammo <= 50)))
            {
                Items.AddThing(new MachinegunItem(this, new Vector(32 + Random.NextDouble() * (Map.Width - 96), 32), Vector.Zero));
            }
        }