public void SetData(FinalPlayerData Data) { Vector3 position = mDMono.transform.parent.localPosition; position.x = mDMono.transform.parent.localPosition.x > 0 ? 1700 : -1700; mDMono.transform.parent.localPosition = position; ItemData = Data ?? new FinalPlayerData(); if (ItemData == null || ItemData.Name == null) { Empty.CustomSetActive(true); Filled.CustomSetActive(false); SetMysterious(true); } else { Empty.CustomSetActive(false); Filled.CustomSetActive(true); Replace.CustomSetActive(false); Icon.spriteName = ItemData.IconName; Frame.spriteName = ItemData.FrameName; Name.text = Name.transform.GetChild(0).GetComponent <UILabel>().text = ItemData.Name; LadderRank.text = LadderRank.transform.GetChild(0).GetComponent <UILabel>().text = string.Format(EB.Localizer.GetString("ID_LADDER_RANK") + ":[fff348]{0}", (ItemData.LadderRank > 0 ? ItemData.LadderRank.ToString() : EB.Localizer.GetString("ID_ARENA_RANK_OUT_OF_RANGE"))); Dead.CustomSetActive(ItemData.Dead); SetMysterious(); } }
private FinalPlayerData Parse(object value, int id) { if (value == null) { return(new FinalPlayerData()); } FinalPlayerData item = new FinalPlayerData(); item.Parse(value); return(item); }
private FinalPlayerData Parse(object value, int id) { if (value == null) { return(new FinalPlayerData()); } FinalPlayerData item = new FinalPlayerData(); item.Parse(value); /*item.uid = EB.Dot.Long("uid", value, item.uid); * item.LadderRank = EB.Dot.Integer("rank", value, -1)+1; * item.Name = EB.Localizer.GetString(EB.Dot.String("name", value, item.Name)); * string IconID = EB.Dot.String("portrait", value, "10010"); * IconID = (IconID == "") ? "10010" : IconID; * Hotfix_LT.Data.HeroInfoTemplate heroInfo = Hotfix_LT.Data.CharacterTemplateManager.Instance.GetHeroInfo(IconID); * item.IconName = (heroInfo != null) ? heroInfo.icon : "Partner_Head_Sugeladi";*/ if (item.uid != 0) { switch (parseState) { case LegionWarField.Wind: { if (item.uid == LoginManager.Instance.LocalUserId.Value) { MyWarField = LegionWarField.Wind; } }; break; case LegionWarField.Water: { if (item.uid == LoginManager.Instance.LocalUserId.Value) { MyWarField = LegionWarField.Water; } }; break; case LegionWarField.Fire: { if (item.uid == LoginManager.Instance.LocalUserId.Value) { MyWarField = LegionWarField.Fire; } }; break; } } return(item); }