private void Start() { if (GameObject.Find("Enviroment") != null) { _enController = GameObject.Find("Enviroment").GetComponent <IEnviromentController>(); } }
// Use this for initialization void Start() { _uiController = GameObject.Find("UI_Manager").GetComponent <IUIController>(); _gameController = GameObject.Find("Game_Manager").GetComponent <IGameController>(); _enController = GameObject.Find("Enviroment").GetComponent <IEnviromentController>(); _rb = GetComponent <Rigidbody>(); if (PlayerPrefs.GetString("Check_Point").Length > 0) { _checkPoint = convertToVec3(PlayerPrefs.GetString("Check_Point")); this.transform.position = _checkPoint; PlayerPrefs.SetString("Check_Point", ""); PlayerPrefs.Save(); } }
void Awake() { EnviromentController = transform.parent.GetComponent(typeof(IEnviromentController)) as IEnviromentController; DeactivatedElement(); }