void Awake() { Current = this; _cellT = (GameObject)Resources.Load("Prefabs/Cell", typeof(GameObject)); _unitT = (GameObject)Resources.Load("Prefabs/Unit", typeof(GameObject)); _cellHolder = new GameObject("CellHolder"); }
void Start() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } sceneNum = SceneManager.GetActiveScene().buildIndex; levelPass = PlayerPrefs.GetInt("levelPass"); }
void Awake() { if (instance != null) { if (instance != this) { Destroy(this.gameObject); } } else { instance = this; DontDestroyOnLoad(this); } }
// Use this for initialization void Start() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } pauseMenuUI.SetActive(false); sceneIndex = SceneManager.GetActiveScene().buildIndex; levelPassed = PlayerPrefs.GetInt("LevelPassed"); }
void Awake() { levelCtrl = this; }
private void Start() { levelCtrl = LevelCtrl.instance; }
void Awake() { Current = this; _cellT = (GameObject)Resources.Load("Prefabs/Cell", typeof(GameObject)); _unitT = (GameObject)Resources.Load ("Prefabs/Unit", typeof(GameObject)); _cellHolder = new GameObject("CellHolder"); }