本文整理汇总了C#中PlayerManager.CmdKillAllBalls方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerManager.CmdKillAllBalls方法的具体用法?C# PlayerManager.CmdKillAllBalls怎么用?C# PlayerManager.CmdKillAllBalls使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerManager
的用法示例。
在下文中一共展示了PlayerManager.CmdKillAllBalls方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnStateEntering
// Stuff done once if you enter a state
void OnStateEntering()
{
switch (GameState ()) {
case State.Intro:
player.CmdKillAllBalls();
introBackground.SetActive(true);
this._introTimePassed = 0.0f;
if (useOVR)
{
this.ovrCam.transform.position = introOVRCamPosition;
}
else
{
SwitchCamera(this.introCam);
}
if (startFading == true)
startFading = false;
if (fadeOutStarted == true)
fadeOutStarted = false;
if (introAlmostDone == true)
introAlmostDone = false;
if (introIsDone == true)
introIsDone = false;
//if (introText) {
// introText.SetActive (true);
// MovingText text = introText.GetComponent<MovingText> ();
// text.Reset ();
//}
//Debug.Log("EnterIntro");
break;
case State.Fight:
var playerObj = GameObject.FindWithTag ("Player");
this.player = playerObj.GetComponent<PlayerManager> ();
if (!hasSpawnedObjects) {
player.CmdSpawnObjects ();
hasSpawnedObjects = true;
} /*else {
player.CmdSpawnBalls();
}*/
player.CmdKillAllBalls();
ballsSpawned = 0;
player.CmdSpawnBalls();
ballsSpawned = 1;
if (useOVR) {
this.ovrCam.transform.position = fightOVRCamPosition;
}
this.score = 0;
this.timeRemaining = 60.0f;
this.scoreText.text = "Score: 0";
this.timeText.text = "Time left: 10";
this.highScoreText.text = "HighScore: " + this.highScore;
if (useOVR) {
SwitchCamera (this.ovrCam);
} else {
SwitchCamera (this.mainCam);
}
break;
case State.Win:
player.CmdKillAllBalls();
this.winText.SetActive (true);
break;
case State.Loose:
// What todo if the player looses.
break;
case State.NetworkSetup:
this._networkSetupTimePassed = 0.0f;
Debug.Log ("Press H to start Host, press C (or wait) to start Client.");
break;
case State.Spectating:
freeLookCameraRig.SetActive (true);
SwitchCamera (this.specCam);
break;
}
}