Ejemplo n.º 1
0
        public static void Update()
        {
            if (SpawnTime > 0.1f)
            {
                SpawnTime -= 0.0008f;
            }

            time += window.deltaTime;
            MissileManager.Update();
            if (time > SpawnTime)
            {
                cloud.Update();
                time = 0;
            }
            EnemyMissileManger.Update();
            HouseManager.Update();
            Ship.Update();
        }
Ejemplo n.º 2
0
 public static void Draw()
 {
     Utils.ClearScreen();
     Utils.DrawSprite(background, 0, 0, 1, 0, 0, background.width, background.height);
     cannon1.draw();
     cannon2.draw();
     cannon3.draw();
     MissileManager.Draw();
     MissileManager.DrawExplosion();
     EnemyMissileManger.Draw();
     HouseManager.Draw();
     Ship.Draw();
     Utils.DrawSprite(Cloud, 0, 0, 1, 0, 0, Cloud.width, Cloud.height);
     crosshair.Draw();
     while (window.opened == false && GameOverTime < 5)
     {
         Utils.ClearScreen();
         Utils.DrawSprite(GameOverScreen, 0, 0, 1, 0, 0, GameOverScreen.width, GameOverScreen.height);
         GameOverTime += window.deltaTime;
         window.Blit();
     }
     window.Blit();
 }