private void warmUp() { // warm up not GUI dependant elements in case they don't exist yet TouchEventManager.warm(); // warm up Pause manager PauseGameManager.warm(); }
public static void warm() { // in case the class wasn't instantiated yet from another script if (instance == null) { // creates the innner instance instance = new PauseGameManager(); } }
private void Awake() { if (instance != null) { Logs.LogW("More than one Pause Game Manager"); return; } instance = this; }
private void Awake() { singleTon = this; Button_Pause.onClick.AddListener(() => { PauseActivate(true); }); Button_Unpause.onClick.AddListener(() => { PauseActivate(false); }); Button_MainMenu.onClick.AddListener(ReturnToMainMenu); if (_achieveentManagement == null) { _achieveentManagement = Behaviour.FindObjectOfType <AchievementsManagement>(); } }
void Awake() { paused = false; if (instance != null && instance != this) { Destroy(this.gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this); return; } _instance = this; Cursor.lockState = CursorLockMode.Locked; Cursor.visible = false; Time.timeScale = 1f; GameStateManager.SetGameState(GameState.GameRunning); }
void OnDestroy() { sceneOnly.Clear(); durables.Clear(); instance = null; }
//prepare the self reference void Awake() { _self = this; }