コード例 #1
0
    private IEnumerator ShowScore()
    {
        string text = Goal1.TeamName + " : " + Goal1.Score + " - " + Goal2.TeamName + " : " + Goal2.Score;;

        Text.text = text;
        Text.transform.Find("Text").guiText.text = text;
        yield return(new WaitForSeconds(2));

        ResetItems();

        Goal1.EnableCollider();
        Goal2.EnableCollider();
        if (Goal1.Score >= Goal.ScoreMax || Goal2.Score >= Goal.ScoreMax)
        {
            menu.RestartGame();
        }
    }