public void init(GodsWarFinalPoint point, int big_id, int yu_ming, WindowBase win, CallBack callback) { this.point = point; this.win = win; this.big_id = big_id; this.yu_ming = yu_ming; this.callback = callback; initButtons(); initDetailInfo(); }
public override void read(ErlKVMessage message) { ErlType erl = message.getValue("msg") as ErlType; if (erl is ErlArray) { GodsWarFinalPoint user; List <GodsWarFinalPoint> infos = new List <GodsWarFinalPoint>(); ErlArray erlarry = erl as ErlArray; int currentPostion = 0; //当前淘汰赛的位置 for (int i = 0; i < erlarry.Value.Length; i++) { ErlArray aa = erlarry.Value[i] as ErlArray; if (aa.Value.Length != 0) { currentPostion++; for (int j = 0; j < aa.Value.Length; j++) { user = new GodsWarFinalPoint(); user.bytesRead(aa.Value[j] as ErlArray); if (user.localID != 0) { infos.Add(user); } } } } GodsWarManagerment.Instance.finalRound = currentPostion; if (infos != null) { GodsWarManagerment.Instance.godsWarFinalPoints = infos; } if (callback != null) { callback(); } } else { MessageWindow.ShowAlert(erl.getValueString()); if (callback != null) { callback = null; } } }
/// <summary> /// 初始化半决赛ui /// </summary> public void initGoupChapingUI(GodsWarFinalPoint point) { FPortManager.Instance.getFPort <GodsWarGetPlayerInfoFPort> ().access(type, index, point.localID, () => { List <GodsWarFinalUserInfo> user = GodsWarManagerment.Instance.pvpGodsWarFinalInfo; for (int j = 0; j < user.Count; j++) { if (point.isHaveWinner == -1) { return; } isOpenShenMo = true; if (user [j].serverName == point.winner.serverName && user [j].uid == point.winner.uid) { ResourcesManager.Instance.LoadAssetBundleTexture(UserManager.Instance.getIconPath(user [j].headIcon), winnerIcon); lblWinner.text = user [j].name + "." + user [j].serverName; winner = user [j]; winnerIconButton.GetComponent <Collider> ().enabled = true; } } }); }
public void initWindow(GodsWarFinalPoint point, CallBack callback) { this.point = point; this.callback = callback; }
public override void read(ErlKVMessage message) { ErlType erl = message.getValue("msg") as ErlType; if (erl is ErlArray) { GodsWarFinalPoint user; GodsWarFinalUserInfo finaluser; List <GodsWarFinalUserInfo> fianlInfo; List <GodsWarFinalPoint> infos; ErlArray erlarry = erl as ErlArray; int pos = 0; ErlArray array = erlarry.Value[pos++] as ErlArray; if (array.Value.Length > 0) { fianlInfo = new List <GodsWarFinalUserInfo>(); for (int i = 0; i < array.Value.Length; i++) { finaluser = new GodsWarFinalUserInfo(); finaluser.bytesReadFive(array.Value[i] as ErlArray); if (finaluser.uid != null) { fianlInfo.Add(finaluser); } } if (fianlInfo != null) { GodsWarManagerment.Instance.shenMoUserlist = fianlInfo; } } ErlArray tmp = erlarry.Value[pos++] as ErlArray; if (tmp.Value.Length > 0) { infos = new List <GodsWarFinalPoint>(); for (int j = 0; j < tmp.Value.Length; j++) { user = new GodsWarFinalPoint(); user.bytesRead(tmp.Value[j] as ErlArray); if (user.localID != 0) { infos.Add(user); } } if (infos != null) { GodsWarManagerment.Instance.shenMoPointlist = infos; } } if (callback != null) { callback(); } } else { MessageWindow.ShowAlert(erl.getValueString()); if (callback != null) { callback = null; } } }