Example #1
0
 private void Start()
 {
     if (GameObject.Find("Enviroment") != null)
     {
         _enController = GameObject.Find("Enviroment").GetComponent <IEnviromentController>();
     }
 }
Example #2
0
    // 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();
        }
    }
Example #3
0
 void Awake()
 {
     EnviromentController = transform.parent.GetComponent(typeof(IEnviromentController)) as IEnviromentController;
     DeactivatedElement();
 }