private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { IntroCameraController instructions = sceneCamera.GetComponent <IntroCameraController>(); instructions.UpdateLocation(location); instructions.UpdateRotation(rotation); instructions.SetFOV(FOV); } }
void Awake() { if (_instance == null) _instance = this; else if (_instance != this) { Destroy(gameObject); } _pinchZoom = GetComponent<PinchZoom>(); _movement = GetComponent<IntroSceneMovement>(); }
void Awake() { if (_instance == null) { _instance = this; } else if (_instance != this) { Destroy(gameObject); } _pinchZoom = GetComponent <PinchZoom>(); _movement = GetComponent <IntroSceneMovement>(); }
private void Awake() { if (instance != null) { Destroy(gameObject); } else { instance = this; } IntroCameraController control = FindObjectOfType <IntroCameraController>(); if (control != null) { Destroy(FindObjectOfType <IntroCameraController>().gameObject); } }