예제 #1
0
 private void Restart(object sender, EventArgs args)
 {
     // TO DO, probably have to make it so it doesn't reset the ui too
     LoadManager.instance.setIsPaused(false);
     LoadManager.instance.setGameOver(true);
     loadManager.LoadGame();
 }
예제 #2
0
 void OnLevelWasLoaded()
 {
     if (initialised)
     {
         if (ResourceManager.LevelName != null && ResourceManager.LevelName != "")
         {
             LoadManager.LoadGame(ResourceManager.LevelName);
         }
         else
         {
             SetObjectIds();
         }
         Time.timeScale           = 1.0f;
         ResourceManager.MenuOpen = false;
     }
 }
 void OnLevelFinishedLoading(Scene scene, LoadSceneMode mode)
 {
     if (initialised)
     {
         if (ResourceManager.LevelName != null && ResourceManager.LevelName != "")
         {
             LoadManager.LoadGame(ResourceManager.LevelName);
         }
         else
         {
             SetObjectIds();
         }
         Time.timeScale           = 1.0f;
         ResourceManager.MenuOpen = false;
     }
 }
 public void Continue()
 {
     try
     {
         LoadManager.LoadGame();
     }
     catch
     {
         return;
     }
     _player.ResetPlayer(2.5f);
     StartCoroutine(FadeUI(2f));
     _audio_source.PlayOneShot(ClickSFX);
     PostTutorialObjects.SetActive(true);
     StartCoroutine(EnablePauseMenu(2f));
 }
예제 #5
0
 public void Continue()
 {
     try
     {
         LoadManager.LoadGame();
     }
     catch
     {
         return;
     }
     _player.ResetPlayer(2.5f);
     StartMenu.FadeOut(2);
     _audio_source.volume = 0.6f * OptionsManager.GetSoundVolume();
     _audio_source.PlayOneShot(ClickSFX);
     PostTutorialObjects.SetActive(true);
     StartCoroutine(EnablePauseMenu(2f));
 }
예제 #6
0
 void OnLevelWasLoaded()
 {
     if (initialised)
     {
         if (ResourceManager.LevelName != null && ResourceManager.LevelName != "")
         {
             LoadManager.LoadGame(ResourceManager.LevelName);
         }
         else
         {
             WorldObject[] worldObjects = GameObject.FindObjectsOfType(typeof(WorldObject)) as WorldObject[];
             foreach (WorldObject worldObject in worldObjects)
             {
                 worldObject.ObjectId = nextObjectId++;
                 if (nextObjectId >= int.MaxValue)
                 {
                     nextObjectId = 0;
                 }
             }
         }
     }
 }
예제 #7
0
 private void StartGame(object sender, EventArgs args)
 {
     loadManager.LoadGame();
 }
 public void NextLevel()
 {
     loadManager.LoadGame();
 }