コード例 #1
0
    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>();
    }
コード例 #2
0
ファイル: CameraManager.cs プロジェクト: sylafrs/rugby
	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>();
	}