本文整理汇总了C#中CameraController类的典型用法代码示例。如果您正苦于以下问题:C#CameraController类的具体用法?C#CameraController怎么用?C#CameraController使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:FindScripts
voidFindScripts()
{
//FindControllerGameObject
GameObjectcontroller=Camera.main.gameObject;
//Attachscriptsthatareattachedtocontrollerobject
sc_CameraController=controller.GetComponent
();
sc_GameController=controller.GetComponent();
sc_LevelManager=controller.GetComponent();
sc_RowManager=controller.GetComponent();
//FindScriptsnotattachedtocontrollerobject
sc_AudioManager=GameObject.Find("audio_manager").GetComponent();
if(LevelName=="Intro")return;
sc_FadeToScene=GameObject.FindGameObjectWithTag("Fade").GetComponent();
sc_HighScoreManager=GameObject.FindGameObjectWithTag("Scores").GetComponent();
if(CheckObjectExist("score_tracker"))
sc_ScoreTracker=GameObject.Find("score_tracker").GetComponent();
if(CheckObjectExist("glow_ball"))
sc_BallController=GameObject.Find("glow_ball").GetComponent();
if(CheckObjectExist("boundaries"))
sc_BoundaryManager=GameObject.Find("boundaries").GetComponent();
}
原文链接:http://www.jxszl.com/biancheng/C/556654.html