public void TimePause() { if (lt.LevelName != "") { if (Time.timeScale == 1) { levelSaveLoad.SaveLevel(lt.LevelName, "PlayerLevelsEditor"); levelSaveLoad.LoadLevel(lt.LevelName, "PlayerLevelsEditor"); Time.timeScale = 0; image.color = new Color(1, 0, 0); image.sprite = pause; } else { Time.timeScale = 1; image.color = new Color(0, 1, 0); image.sprite = play; } } else { levelManager.gameObject.SetActive(false); windowCantPlay.SetActive(true); } }
public void LoadFile() { _levelSaveLoad.LoadLevel(selectedFile, "PlayerLevelsEditor"); leave.ModifUnsaved = false; }