コード例 #1
0
ファイル: camControl.cs プロジェクト: Cam582/Top-Hats
	// Use this for initialization

	//TODO:
	//set the depth of field target to the camera target if they do not match.
	//add support for presets to look away from the target
	//camera shake should cancel out another shake if intensity is high enough
	//add a screenfade

	void Awake(){
		DontDestroyOnLoad (this.gameObject);
		if (cm == null) {
			cm = this;
		} else {
			Destroy (this.gameObject);
		}

	}
コード例 #2
0
 void Awake()
 {
     if (cam == null)
     {
         DontDestroyOnLoad(gameObject);
         cam = this;
     }
     else if (cam != this)
     {
         Destroy(gameObject);
     }
 }