예제 #1
0
    // 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();
        }
    }
예제 #2
0
    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;
        }
    }
예제 #3
0
 void Update()
 {
     point = JudgeWinPlayer.checkP1();
     this.GetComponent <Text>().text = point.ToString();
 }
예제 #4
0
 // Update is called once per frame
 void Update()
 {
     this.GetComponent <Text>().text = " PLAYER " + JudgeWinPlayer.checkWinner().ToString() + "\nWINNER!";
 }