Example #1
0
 void OnDestroy()
 {
     TeamSystem.OnInitMyTeam       -= HideSelf;
     gameUpdateLobby                = null;
     TeamSystem.OnUpdateMyTeamInfo -= updateTeaminfo;
     TeamSystem.OnChangeTeam       -= UpdateListTeamInfo;
     //InitLobbyTeamOK = null;
 }
Example #2
0
    private static string UpdateLobbyInfoJson(string lobbyId, string playerId, string state)
    {
        var lobbyIdJson = new UpdateLobby()
        {
            lobbyId  = lobbyId,
            playerId = playerId,
            state    = state
        };
        var jsonString = JsonConvert.SerializeObject(lobbyIdJson);

        return(JsonCreator.RemoveSlash(JsonCreator.CreateJson(LobbyType.update.ToString(), jsonString)));
    }
Example #3
0
 void Start()
 {
     InitUIText();
     typeTeam = TeamSystem._teamType;
     team_item.SetActive(false);
     target_item.SetActive(false);
     ReBtn.gameObject.SetActive(false);
     wuLabel.gameObject.SetActive(false);
     UIManager.SetButtonEventHandler(CloseBtn.gameObject, EnumButtonEvent.OnClick, OnClickClose, 0, 0);
     UIManager.SetButtonEventHandler(CreateBtn.gameObject, EnumButtonEvent.OnClick, OnClickCreate, 0, 0);
     UIManager.SetButtonEventHandler(KuaisuBtn.gameObject, EnumButtonEvent.OnClick, OnClickKuaisu, 0, 0);
     //UIManager.SetButtonEventHandler (ReBtn.gameObject, EnumButtonEvent.OnClick, OnClickRe, 0, 0);
     gameUpdateLobby                = UpdateLobbyTeam;
     TeamSystem.OnInitMyTeam       += HideSelf;
     TeamSystem.OnUpdateMyTeamInfo += updateTeaminfo;
     TeamSystem.OnChangeTeam       += UpdateListTeamInfo;
     ShowContingent();
     AddtargetItems();
     if (TeamSystem._teamType != TeamType.TT_None)
     {
         GlobalInstanceFunction.Instance.Invoke(() => { UpdateTeamTargetPosition(); }, 1);
     }
 }