public void Init(RoomData roomData, InviteType match = InviteType.Null, bool isHoner = false, MatchTeamType type = MatchTeamType.Blue) { this.recordTeamType = type; this.recordInviteType = match; this.recordHoner = isHoner; this.M_StateActive.gameObject.SetActive(match == InviteType.AcceptInvite); this.M_StateLock.gameObject.SetActive(match == InviteType.Null); this.recordRoomData = roomData; this.IsShowFrame(false); if (roomData == null) { string name = string.Empty; base.name = name; this.recordUseId = name; } else { string name = roomData.UserId; base.name = name; this.recordUseId = name; } if (isHoner) { if (!base.GetComponent <KHDragDropItem>()) { base.gameObject.AddComponent <KHDragDropItem>(); } else { base.GetComponent <KHDragDropItem>().enabled = true; } base.GetComponent <KHDragDropItem>().cloneOnDrag = true; if (roomData == null) { base.GetComponent <KHDragDropItem>().enabled = false; } } else if (base.GetComponent <KHDragDropItem>()) { base.GetComponent <KHDragDropItem>().enabled = false; } this.M_Drag.gameObject.SetActive(isHoner); if (!isHoner && roomData != null) { this.M_AddFriend.gameObject.SetActive(Singleton <PvpRoomView> .Instance.IsFriend(roomData.AccountId)); } if (roomData == null) { return; } if (isHoner) { this.M_Delete.gameObject.SetActive(!roomData.IsHomeMain); } else { this.M_Delete.gameObject.SetActive(false); } this.M_SummonerName.text = roomData.NickName + ((!roomData.IsHomeMain) ? string.Empty : LanguageManager.Instance.GetStringById("GangUpUI_HouseOwner")); if (roomData.NickName == ModelManager.Instance.Get_userData_X().NickName) { this.M_SummonerName.color = new Color(1f, 0.843137264f, 0.211764708f); } else { this.M_SummonerName.color = Color.white; } this.M_SummonerName.gameObject.GetComponent <AllochroicLabelChecker>().RenderLabel(roomData.CharmRankValue); UIEventListener.Get(this.M_Delete.gameObject).onClick = new UIEventListener.VoidDelegate(this.ClickM_Delete); }
public void Init(List <RoomData> friends, int num, MatchTeamType type = MatchTeamType.Blue, bool isOwner = false) { MatchTypeItem.< Init > c__AnonStorey2A1 <Init> c__AnonStorey2A = new MatchTypeItem.< Init > c__AnonStorey2A1();