private void OnClickGameServerItem(RetGameserverEntity obj) { if (OnClickItem != null) { OnClickItem(obj); } }
public void SetUI(RetGameserverEntity entity) { Color curColor = m_StatusColors[entity.RunSatus]; m_CurrentStatusImage.color = curColor; m_NameText.text = entity.Name; m_RetData = entity; }
private void OnDestroy() { m_CurrentStatusImage = null; m_NameText = null; m_Button = null; m_RetData = null; OnClickGameServerItem = null; }
private void SetLastGameServer(RetAccountEntity accountEntity) { RetGameserverEntity serverEntity = new RetGameserverEntity(); serverEntity.Id = accountEntity.LastServerId; serverEntity.Name = accountEntity.LastServerName; serverEntity.Ip = accountEntity.LastServerIP; serverEntity.Port = accountEntity.LastServerPort; Global.Instance.GameServerEntiry = serverEntity; }
/// <summary> /// 更新进入的最后的服务器 /// </summary> /// <param name="accountEntity"></param> /// <param name="serverEntity"></param> private void UpdatelastServer(RetAccountEntity accountEntity, RetGameserverEntity serverEntity) { Dictionary <string, object> msg = new Dictionary <string, object>(); msg.Add("Type", "2"); msg.Add("UserID", accountEntity.Id); msg.Add("LastServerId", serverEntity.Id); msg.Add("LastServerName", serverEntity.Name); NetWorkHttp.Instance.SendData(Global.Instance.WeAccountUrl + "api/gameserver", UpdateLastServerCallBack, isPost: true, dic: msg); }
public void SetCurrentGameServe(RetGameserverEntity entity) { m_CurrentGameServer.SetUI(entity); }
/// <summary> /// 点击服务器物体 /// </summary> /// <param name="retData"></param> private void OnClickItem(RetGameserverEntity retData) { m_GameServerSelectView.Close(); Global.Instance.GameServerEntiry = retData; m_GameServerEnterView.SetUI(retData.Name); }