private void Awake() { // if copies of this script is created, destroy the copy (aswell as the gameobject it sits on). if (s_menuHolder == null) { s_menuHolder = gameObject; } else { Destroy(gameObject); } DontDestroyOnLoad(gameObject); InitializeCanvases(); controlTime = gameObject.GetComponentInChildren <ControlTime>(true); }
private void Awake() { curren = this; TimeSpeed = 0.1f; dayProp = -9; }