Skip to content
Snippets Groups Projects
Select Git revision
  • e89e3bab493bcbe3340d7ba14845d1cbff0af83f
  • main default
  • master
  • tempAndrToMaster
4 results

ToolModeText.cs.meta

Blame
  • Restart.cs 748 B
    using UnityEngine;
    using UnityEngine.SceneManagement;
    
    public class Restart : MonoBehaviour
    {
        public void LevelReset()
        {
            CommunicationEvents.LevelReset.Invoke(); // currently unused
    
            // delete Facts at Server
            CommunicationEvents.LevelFacts.hardreset(false);
            // only when generated! (in Level.cs)
            CommunicationEvents.SolutionManager.hardreset(false);
    
            SceneManager.LoadSceneAsync(SceneManager.GetActiveScene().buildIndex);
        }
    
        public void LoadStartScreen()
        {
            StartServer.process.Kill();  // null reference exception if Server started manually
            SceneManager.LoadScene(0);
        }
    
        public void OnApplicationQuit()
        {
            StartServer.process.Kill();
        }
    }