Ejemplo n.º 1
0
    public override void OnMatchCreate(bool success, string extendedInfo, MatchInfo matchInfo)
    {
        base.OnMatchCreate(success, extendedInfo, matchInfo);

        CurrentMatchInfo = matchInfo;
        ColorsInUse.Clear();
    }
Ejemplo n.º 2
0
    public override void OnStartHost()
    {
        base.OnStartHost();

        SwitchPanel(LobbyPanel);
        ColorsInUse.Clear();
    }
Ejemplo n.º 3
0
    //leave lobby and return to multiplayer screen
    public void LeaveLobby()
    {
        if (CurrentlyMatchmaking)
        {
            if (matchMaker != null)
            {
                matchMaker.DestroyMatch(CurrentMatchInfo.networkId, 0, OnDestroyMatch);
            }
            StopHost();
            ColorsInUse.Clear();
        }
        else if (NetworkServer.active)
        {
            StopHost();
        }
        else
        {
            StopClient();
        }

        SwitchPanel(MultiplayerPanel);
    }