Example #1
0
 public void Reset()
 {
     SoundPool.StopBackgroundMusic();
     PhysicsWorld.Instance.DestroyAllBodies();
     ScoreSystem.Reset();
     Initialize();
     LoadAllGameObjects();
     gameIsOver = false;
 }
Example #2
0
 public void GameOver()
 {
     SoundPool.StopBackgroundMusic();
     PhysicsWorld.Instance.DestroyAllBodies();
     Initialize();
     gameIsOver = true;
     gameObjects.Clear();
     ScoreSystem.Reset();
     MoveCamera(Vector2.Zero);
     backgroundMap = ItemSpriteFactory.Instance.CreateGameOverSprite();
 }