void OnEnable() { m_Instance = this; //GameManager.gameManager.ActiveScene.InitFakeObjRoot(m_TeamMemberModelViewTopLeft, m_TeamMemberModelViewBottomRight); //GameManager.gameManager.ActiveScene.ShowFakeObj(); GUIData.delNearbyTeampUpdate += UpdateNearbyTeam; GUIData.delNearbyPlayerUpdate += UpdateNearbyPlayer; GUIData.delTeamDataUpdate += OnTeamInfoUpdate; SelectPlayerListItem(null); m_TabGrid.hideInactive = false; m_TabController.ChangeTab("0"); }
void OnMenuClick() { if (m_selfTeamMember == null) { return; } if (RelationTeamWindow.Instance() != null) { RelationTeamWindow.Instance().ShowTeamMemberListMenu(m_selfTeamMember.Guid, m_nTeamPosIndex); UpdateChoose(true); RelationTeamWindow.Instance().OnTeamMemberItemClick(m_selfTeamMember); } }
public void OnItemClick() { if (m_selfTeamMember == null) { return; } //to do 新增 需要显示模型 UpdateChoose(true); if (RelationTeamWindow.Instance() != null) { RelationTeamWindow.Instance().OnTeamMemberItemClick(m_selfTeamMember); RelationTeamWindow.Instance().CloseTeamMemberListMenu(); } }
void OnDisable() { m_Instance = null; GameManager.gameManager.ActiveScene.HideFakeObj(); GUIData.delNearbyTeampUpdate -= UpdateNearbyTeam; GUIData.delNearbyPlayerUpdate -= UpdateNearbyPlayer; GUIData.delTeamDataUpdate -= OnTeamInfoUpdate; SelectPlayerListItem(null); if (m_TeamMemberMenu.activeSelf) { if (m_TeamMemberMenu.GetComponent <TeamMemberMenuLogic>() != null) { m_TeamMemberMenu.GetComponent <TeamMemberMenuLogic>().CloseMenu(); } } DestroyPartnerFakeObj(); }
public static PlayerListItemLogic CreateItem(GameObject grid, GameObject resItem, string name, RelationTeamWindow parent) { if (null == resItem) { LogModule.ErrorLog("PlayerListItemLogic Create resItem is null_2"); return(null); } GameObject curItem = Utils.BindObjToParent(resItem, grid, name); if (null != curItem) { PlayerListItemLogic curItemComponent = curItem.GetComponent <PlayerListItemLogic>(); if (null != curItemComponent) { curItemComponent.SetParent(parent); } return(curItemComponent); } return(null); }
public void SetParent(RelationTeamWindow parent) { m_TeamParent = parent; m_FriendParent = null; }