コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        if (FindingMatch)
        {
            fakeMatchmakingCount++;

            if (MusicObject)
            {
                if (MusicObject.GetComponent <AudioSource>().volume > 0)
                {
                    MusicObject.GetComponent <AudioSource>().volume -= 0.001f;
                }
            }
        }

        if (FoundMatch)
        {
            HeadingText.GetComponent <TextMeshProUGUI>().text = "Match Found, Prepare for Battle";
        }

        if (FoundMatch && fakeMatchmakingCount > 1150)
        {
            FadeoutPaneltoGame.SetActive(true);
        }
    }
コード例 #2
0
 public void CancelMatchmaking()
 {
     QuickPlayButton.SetActive(true);
     ProfileButton.SetActive(true);
     BackButton.SetActive(true);
     HeadingText.GetComponent <TextMeshProUGUI>().text = "Choose Operation";
     FindingMatch = false;
     MusicObject.GetComponent <AudioSource>().volume = 1.0f;
 }