// Update is called once per frame void Update() { if (GameObject.Find("Ball") == null && !(JudgeWinPlayer.checkWinner() > 0)) //ボールがない、かつ勝者が決まっていない { GameObject newBall = (GameObject)Instantiate(ball); newBall.name = ball.name; } if (JudgeWinPlayer.checkWinner() > 0) //勝者が決まった場合1,2が入る { GameFinish(); } }
public void GameStop() { if (!(JudgeWinPlayer.checkWinner() > 0)) //リザルト画面では無効 { if (!isStoping) { // obj = Instantiate(ui); ポーズ画面呼び出し Time.timeScale = 0; pose.SetActive(true); } else { Time.timeScale = 1; pose.SetActive(false); //Destroy(obj); } isStoping = !isStoping; } }
void Update() { point = JudgeWinPlayer.checkP1(); this.GetComponent <Text>().text = point.ToString(); }
// Update is called once per frame void Update() { this.GetComponent <Text>().text = " PLAYER " + JudgeWinPlayer.checkWinner().ToString() + "\nWINNER!"; }