Esempio n. 1
0
    IEnumerator RevealButtons()
    {
        yield return(new WaitForSeconds(1.0f));

        int numberOfLobbies = 0;

        if (!PlayerPrefs.GetString("redLobbyAvailable").Equals("off"))
        {
            redLobbyButton.Init(this);
            redLobbyButton.IsActive = true;
            numberOfLobbies++;
            yield return(new WaitForSeconds(0.1f));
        }
        else
        {
            redLobbyButton.gameObject.SetActive(false);
        }

        if (!PlayerPrefs.GetString("greenLobbyAvailable").Equals("off"))
        {
            greenLobbyButton.Init(this);
            greenLobbyButton.IsActive = true;
            numberOfLobbies++;
            yield return(new WaitForSeconds(0.1f));
        }
        else
        {
            greenLobbyButton.gameObject.SetActive(false);
        }

        if (!PlayerPrefs.GetString("blueLobbyAvailable").Equals("off"))
        {
            blueLobbyButton.Init(this);
            blueLobbyButton.IsActive = true;
            numberOfLobbies++;
            yield return(new WaitForSeconds(0.1f));
        }
        else
        {
            blueLobbyButton.gameObject.SetActive(false);
        }
        uiControl.CloseIntro();

        upPos     = new Vector2(0, lobbyHeader.rect.height + (numberOfLobbies * 260) + 100);
        IsVisible = true;
    }