Esempio n. 1
0
        public override void Update(RenderWindow window)
        {
            if (Enemies.Count == 0)
            {
                WinScreen.Display();
                return;
            }

            Boss.Sprite.Color = Color.Red;

            base.Update(window);
        }
Esempio n. 2
0
        public override void Update(RenderWindow window)
        {
            if (numWaveNow == numWaves && Enemies.Count == 0)
            {
                WinScreen.Display();
            }

            if (numWaveNow != numWaves)
            {
                if ((DateTime.Now - timeNowWave).TotalSeconds > timeToNewWave || Enemies.Count == 0)
                {
                    for (var i = 0; i < numWaveNow; i++)
                    {
                        Enemies.Add(Character.SpawnCharacter(75, new Point(random.Next((int)Program.WidthWindow), -100), CharacterMovesAnimation.StandEnemyTexture, new ShotGun()));
                    }

                    timeNowWave = DateTime.Now;
                    numWaveNow++;
                }
            }

            base.Update(window);
        }