void Awake() { thirdPersonCamera = gameObject.GetComponent<ThirdPersonCameraScript>(); singlePersonCamera = gameObject.GetComponent<CameraFollow>(); if (!player) { Debug.LogWarning("Please assign your players in inspector. Setting B4 from script."); player = GameObject.FindGameObjectWithTag("B4"); } singlePersonCamera.player = player.transform; changeCameraType(type); }
// Use this for initialization void Start() { cameraScript = cam.GetComponent<ThirdPersonCameraScript>(); lastChange = Time.time; }
void Start() { cameraScript = Camera.main.GetComponent<ThirdPersonCameraScript>(); image = UIImage.GetComponent<Image>(); infectionScript = GetComponent<TowerInfectionScript>(); materialScript = GetComponent<FadeMaterial>(); sfxSource = gameObject.AddComponent<AudioSource>(); chargeSource = gameObject.AddComponent<AudioSource>(); musicSource = GameObject.FindGameObjectWithTag("MusicController").GetComponent<AudioSource>(); m_originalLightValue = ChannellingLight.intensity; }