void Awake() { Camera camera = Camera.mainCamera; GameObject camObject = camera.gameObject; //add components camObject.AddComponent <CameraShake>(); camObject.AddComponent <CameraZoom>(); camObject.AddComponent <CameraRotatingAround>(); //get Component this.CameraShakeComponent = camera.GetComponent <CameraShake>(); this.CameraZoomComponent = camera.GetComponent <CameraZoom>(); this.CameraRotatingAroundComponent = camera.GetComponent <CameraRotatingAround>(); this.SuperMaoriCutSceneComponent = camera.GetComponent <SuperMaoriCutSceneScript>(); this.SuperJapaneseCutSceneComponent = camera.GetComponent <SuperJapaneseCutSceneScript>(); this.WiningPointsCutSceneComponent = camera.GetComponent <WiningPointsCutScene>(); }
void Awake(){ Camera camera = Camera.mainCamera; GameObject camObject = camera.gameObject; //add components camObject.AddComponent<CameraShake>(); camObject.AddComponent<CameraZoom>(); camObject.AddComponent<CameraRotatingAround>(); //get Component this.CameraShakeComponent = camera.GetComponent<CameraShake>(); this.CameraZoomComponent = camera.GetComponent<CameraZoom>(); this.CameraRotatingAroundComponent = camera.GetComponent<CameraRotatingAround>(); this.SuperMaoriCutSceneComponent = camera.GetComponent<SuperMaoriCutSceneScript>(); this.SuperJapaneseCutSceneComponent = camera.GetComponent<SuperJapaneseCutSceneScript>(); this.WiningPointsCutSceneComponent = camera.GetComponent<WiningPointsCutScene>(); }