Пример #1
0
 void OnTriggerEnter(Collider other)
 {
     if (other.tag == "Player")
     {
         script = other.gameObject.GetComponent <UpdatedCharacterControllerScript>();
         mainCamera.GetComponent <cameraAudioManager>().switchBackgroundMusic(OnEnterWater);
     }
 }
Пример #2
0
 void Start()
 {
     anim   = gameObject.GetComponentInChildren <Animator>();
     script = gameObject.GetComponent <UpdatedCharacterControllerScript>();
 }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     characterScript = player.GetComponent <UpdatedCharacterControllerScript>();
 }