Beispiel #1
0
 void Awake()
 {
     playerMovementInput = new Vector3();
     viewport = GetComponentInChildren<Camera>();
     flashLight = GetComponent<Light>();
     audioAssets = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<AudioAssets>();
     try
     {
         levelController = GameObject.FindGameObjectWithTag(Tags.levelController).GetComponent<MainLevelController>();
     }catch(Exception e) {
         Debug.Log(e);
     } 
 }
Beispiel #2
0
 void Awake()
 {
     player = GameObject.FindGameObjectWithTag(Tags.player);
     if(player != null)
     {
         playerViewport = player.GetComponentInChildren<Camera>();
         viewportBlur = player.GetComponentInChildren<Blur>();
         playerInput = player.GetComponent<Player_Input>();
     }
     contextMessage.text = "";
     
     if (SceneManager.GetActiveScene().buildIndex == 2)
         levelController = GameObject.FindGameObjectWithTag(Tags.levelController).GetComponent<MainLevelController>();
 }
Beispiel #3
0
 void Awake()
 {
     subRenderer = GetComponentsInChildren<MeshRenderer>();
     levelController = GameObject.FindGameObjectWithTag(Tags.levelController).GetComponent<MainLevelController>();
 }