void Start() { m_SelShenQiStuffObj.SetActive(false); m_SkillTab.delTabChanged = OnSkillTabClick; UIManager.LoadItem(UIInfo.LivingSkillFormulaItem, LoadFormulaItemOver); UIManager.LoadItem(UIInfo.LivingSkillStuffItem, LoadStuffItemOver); m_StuffCollectInfo.SetActive(false); if (GameManager.gameManager.PlayerDataPool.MainPlayerBaseAttr.Level < (int)ShenQiInfo.MINOPENLEVEL) { TabButton _ShenQiBtTab = m_SkillTab.GetTabButton(ShenQiTabStr); if (_ShenQiBtTab != null) { _ShenQiBtTab.gameObject.SetActive(false); } } UpdatePlayerStamina(); UpdateCountDownLabel(); UIEventListener.Get(m_HelpIcon).onClick = ShowHelpInfo; UIEventListener.Get(m_GetInfoCloseBg).onClick = HideGetInfo; Check_NewPlayerGuide(); #if BOBJOYSTICK UIRootJoyControllerHelper.Instance.setState(UIRootJoyControllerHelper.JoyUIState.MAKE_UI); #endif }
void OnEnable() { SetInstance(this); LoadAllGoodsDicPriority(); m_BuyTypeController.ChangeTab("2Bind"); GameManager.gameManager.ActiveScene.InitFakeObjRoot(m_FakeObjTopLeft, m_FakeObjBottomRight); GameManager.gameManager.ActiveScene.ShowFakeObj(); m_TabController.delTabChanged = TabOnClick; //m_YuanBaoShopTable = TableManager.GetYuanBaoShop(); m_Deadline.SetActive(false); m_YBShopNumChoose.SetActive(false); m_BuyTypeController.delTabChanged = BuyTypeOnClick; UpdateYuanBaoInfo(); m_TabController.InitData(); bool bShowMountTab = GameManager.gameManager.PlayerDataPool.IsServerFlagOpen(SERVER_FLAGS_ENUM.FLAG_MOUNTTAB); if (m_TabController.GetTabButton("Sort04-Tab3") != null && m_TabController.GetTabButton("Sort04-Tab3").gameObject != null) { m_TabController.GetTabButton("Sort04-Tab3").gameObject.SetActive(bShowMountTab); } bool bShowVipTab = GameManager.gameManager.PlayerDataPool.IsServerFlagOpen(SERVER_FLAGS_ENUM.FLAG_VIP); if (m_TabController.GetTabButton("Sort06-Tab5") != null && m_TabController.GetTabButton("Sort06-Tab5").gameObject != null) { m_TabController.GetTabButton("Sort06-Tab5").gameObject.SetActive(bShowVipTab); } m_TabGrid.Reposition(); //如果是情人节界面点击,跳转到限时界面 if (OPEN_TYPE.OPEN_FESTIVAL == YuanBaoShopOpenType) { m_TabController.ChangeTab("Sort02-Tab999"); } else if (OPEN_TYPE.OPEN_FLOWEREGG == YuanBaoShopOpenType) { m_TabController.ChangeTab("Sort05-Tab4"); } else { m_TabController.ChangeTab("Sort01-Tab1"); } InitFakeObj(); m_FitOnVisual.Clear(); #if BOBJOYSTICK UIRootJoyControllerHelper.Instance.setState(UIRootJoyControllerHelper.JoyUIState.SHOP_UI); #endif }
public void NewPlayerGuide(int nIndex) { m_NewPlayerGuide_Step = nIndex; switch (nIndex) { case 0: TabButton tabFight = m_TabController.GetTabButton("Tab2"); if (tabFight) { NewPlayerGuidLogic.OpenWindow(tabFight.gameObject, 240, 70, "", "right", 0, true, true); } break; case 1: //NewPlayerGuidLogic.OpenWindow(m_ButtonFight, 280, 110, "请点此处", "right", 0,true, true); break; case 2: //TabButton tabButton3 = m_TabController.GetTabButton("Tab1"); //if (tabButton3) //{ // NewPlayerGuidLogic.OpenWindow(tabButton3.gameObject, 280, 110, "", "right", 0, true, true); //} break; case 3: // 藏经阁 TabButton tabButton5 = m_TabController.GetTabButton("Tab5"); if (tabButton5) { NewPlayerGuidLogic.OpenWindow(tabButton5.gameObject, 240, 70, "", "right", 0, true, true); } break; case 4: // 燕子坞 TabButton tabButton6 = m_TabController.GetTabButton("Tab6"); if (tabButton6) { NewPlayerGuidLogic.OpenWindow(tabButton6.gameObject, 240, 70, "", "right", 0, true, true); } break; case 5: // 聚贤庄 TabButton tabButton2 = m_TabController.GetTabButton("Tab3"); if (tabButton2) { NewPlayerGuidLogic.OpenWindow(tabButton2.gameObject, 240, 70, "", "right", 0, true, true); } break; case 6: // 珍珑棋局 TabButton tabButton7 = m_TabController.GetTabButton("Tab7"); if (tabButton7) { NewPlayerGuidLogic.OpenWindow(tabButton7.gameObject, 240, 70, "", "right", 0, true, true); } break; case 7: // 活动界面按钮 { TabButton tabHuoDong = m_HuoDongControl.GetTabButton("Button1-HuoDong"); if (tabHuoDong && tabHuoDong.objHighLight) { if (tabHuoDong.objHighLight.activeInHierarchy == false) { NewPlayerGuidLogic.OpenWindow(tabHuoDong.gameObject, 240, 70, "", "right", 0, true, true); } else { NewPlayerGuide(3); } } } break; case 8: { TabButton tabHuoDong = m_HuoDongControl.GetTabButton("Button1-HuoDong"); if (tabHuoDong && tabHuoDong.objHighLight) { if (tabHuoDong.objHighLight.activeInHierarchy == false) { NewPlayerGuidLogic.OpenWindow(tabHuoDong.gameObject, 240, 70, "", "right", 0, true, true); } else { NewPlayerGuide(9); } } } break; case 9: { TabButton tabButtonHunDunZhiDi = m_TabController.GetTabButton("Tab2"); if (tabButtonHunDunZhiDi) { NewPlayerGuidLogic.OpenWindow(tabButtonHunDunZhiDi.gameObject, 240, 70, "", "right", 0, true, true); } } break; // 黄昏 case 30: { TabButton tabHuoDong = m_HuoDongControl.GetTabButton("Button1-HuoDong"); if (tabHuoDong) { m_HuoDongControl.ChangeTab("Button1-HuoDong"); } if (tabHuoDong && tabHuoDong.objHighLight) { if (tabHuoDong.objHighLight.activeInHierarchy == false) { NewPlayerGuidLogic.OpenWindow(tabHuoDong.gameObject, 240, 70, "", "right", 0, true, true); } else { NewPlayerGuide(40); } } } break; case 40: { TabButton huanghunyaosai = m_TabController.GetTabButton("Tab6"); if (huanghunyaosai) { NewPlayerGuidLogic.OpenWindow(huanghunyaosai.gameObject, 240, 70, "", "right", 0, true, true); } } break; // 机械研究所 case 31: { TabButton tabHuoDong = m_HuoDongControl.GetTabButton("Button1-HuoDong"); if (tabHuoDong) { m_HuoDongControl.ChangeTab("Button1-HuoDong"); } if (tabHuoDong && tabHuoDong.objHighLight) { if (tabHuoDong.objHighLight.activeInHierarchy == false) { NewPlayerGuidLogic.OpenWindow(tabHuoDong.gameObject, 240, 70, "", "right", 0, true, true); } else { NewPlayerGuide(41); } } } break; case 41: { TabButton jixieyanjiusuo = m_TabController.GetTabButton("Tab7"); if (jixieyanjiusuo) { NewPlayerGuidLogic.OpenWindow(jixieyanjiusuo.gameObject, 240, 70, "", "right", 0, true, true); } } break; // 雷纳包 case 32: { TabButton tabHuoDong = m_HuoDongControl.GetTabButton("Button1-HuoDong"); if (tabHuoDong) { m_HuoDongControl.ChangeTab("Button1-HuoDong"); } if (tabHuoDong && tabHuoDong.objHighLight) { if (tabHuoDong.objHighLight.activeInHierarchy == false) { NewPlayerGuidLogic.OpenWindow(tabHuoDong.gameObject, 240, 70, "", "right", 0, true, true); } else { NewPlayerGuide(42); } } } break; case 42: { TabButton leinabao = m_TabController.GetTabButton("Tab3"); if (leinabao) { NewPlayerGuidLogic.OpenWindow(leinabao.gameObject, 240, 70, "", "right", 0, true, true); } } break; // 冰冻地下 case 33: { TabButton tabHuoDong = m_HuoDongControl.GetTabButton("Button1-HuoDong"); if (tabHuoDong) { m_HuoDongControl.ChangeTab("Button1-HuoDong"); } if (tabHuoDong && tabHuoDong.objHighLight) { if (tabHuoDong.objHighLight.activeInHierarchy == false) { NewPlayerGuidLogic.OpenWindow(tabHuoDong.gameObject, 240, 70, "", "right", 0, true, true); } else { NewPlayerGuide(43); } } } break; case 43: { TabButton bingdongdixia = m_TabController.GetTabButton("Tab8"); if (bingdongdixia) { NewPlayerGuidLogic.OpenWindow(bingdongdixia.gameObject, 240, 70, "", "right", 0, true, true); } } break; // 废弃都市 case 34: { TabButton tabHuoDong = m_HuoDongControl.GetTabButton("Button1-HuoDong"); if (tabHuoDong) { m_HuoDongControl.ChangeTab("Button1-HuoDong"); } if (tabHuoDong && tabHuoDong.objHighLight) { if (tabHuoDong.objHighLight.activeInHierarchy == false) { NewPlayerGuidLogic.OpenWindow(tabHuoDong.gameObject, 240, 70, "", "right", 0, true, true); } else { NewPlayerGuide(44); } } } break; case 44: { TabButton bingdongdixia = m_TabController.GetTabButton("Tab13"); if (bingdongdixia) { Vector3 vOffset = Vector3.zero; vOffset.y = 60; m_TabController.GetComponentInParent <UIDraggablePanel>().MoveRelative(vOffset); NewPlayerGuidLogic.OpenWindow(bingdongdixia.gameObject, 240, 70, "", "right", 0, true, true); } } break; // pvp case 35: { TabButton tabHuoDong = m_HuoDongControl.GetTabButton("Button1-TiaoZhan"); if (tabHuoDong) { m_HuoDongControl.ChangeTab("Button1-TiaoZhan"); } if (tabHuoDong && tabHuoDong.objHighLight) { if (tabHuoDong.objHighLight.activeInHierarchy == false) { NewPlayerGuidLogic.OpenWindow(tabHuoDong.gameObject, 240, 70, "", "right", 0, true, true); } else { //NewPlayerGuide(44); } } } break; } if (m_TabUITopGrid) { //m_TabUITopGrid.transform.parent.GetComponent<UIDraggablePanel>().scale = Vector3.zero; } }
void Start() { GUIData.delGuildDataUpdate += UpdateData; GUIData.delGuildMemberSelectChange += OnSelectMemberChange; m_IsOnlyShowEnemyToggle.value = m_bIsOnlyShowEnemyGuild; m_ChallenegWarRoot.SetActive(false); //在OnEnable中有可能无法读取分页按钮,这里重新进行一次赋值 if (null != m_GuildTabController) { m_GuildInfoTabButton = m_GuildTabController.GetTabButton("03GuildInfoButton"); m_GuildWarInfoTabButton = m_GuildTabController.GetTabButton("GuildWarButton"); m_GuildShopTabButton = m_GuildTabController.GetTabButton("05GuildShopButton"); m_JoinGuildTabButton = m_GuildTabController.GetTabButton("01JoinGuild"); //m_SearchGuildTabButton = m_GuildTabController.GetTabButton("02SearchGuild"); m_GuildActivityTabButton = m_GuildTabController.GetTabButton("04GuildActivityButton"); } //如果无帮会则直接切换到帮会列表界面 if (!GameManager.gameManager.PlayerDataPool.IsHaveGuild()) { if (null != m_GuildTabController) { if (null != m_GuildTabController) { CloseOrOpenCreateGuildGO(false); m_GuildTabController.ChangeTab("01JoinGuild"); //没有帮会的玩家,隐藏这两个选项 m_GuildPreInfoTabButton.SetActive(false); m_GuildInfoTabButton.gameObject.SetActive(false); m_GuildShopTabButton.gameObject.SetActive(false); // 没帮会的玩家也可以看到福利内容但是按钮不可以点击 m_GuildWarInfoTabButton.gameObject.SetActive(false); m_GuildActivityTabButton.gameObject.SetActive(false); m_JoinGuildTabButton.gameObject.SetActive(true); //m_SearchGuildTabButton.gameObject.SetActive(true); m_GuildTabController.SortTabGrid(); } // 尝试切换预设分页 //TestStartTab(m_GuildTabController); return; } } else { if (null != m_GuildInfoTabButton) { m_GuildTabController.ChangeTab("03GuildInfoButton"); m_GuildPreInfoTabButton.SetActive(true); m_GuildInfoTabButton.gameObject.SetActive(true); m_GuildWarInfoTabButton.gameObject.SetActive(false); m_GuildShopTabButton.gameObject.SetActive(true); m_GuildActivityTabButton.gameObject.SetActive(true); m_JoinGuildTabButton.gameObject.SetActive(false); //m_SearchGuildTabButton.gameObject.SetActive(false); m_GuildTabController.SortTabGrid(); } } // 尝试切换预设分页 //TestStartTab(m_GuildTabController); }
//更新组队信息 void UpdateTeamInfo(UInt64 oLastSelectMemberGuid) { if (false == GameManager.gameManager.PlayerDataPool.IsHaveTeam()) { m_CreateTeamButton.gameObject.SetActive(true); m_GatherTeamButton.gameObject.SetActive(false); m_TeamFollowButton.gameObject.SetActive(false); m_DismissTeamButton.SetActive(false); } else { m_CreateTeamButton.gameObject.SetActive(false); if (Singleton <ObjManager> .Instance.MainPlayer) { bool bRetShow = Singleton <ObjManager> .Instance.MainPlayer.IsTeamLeader(); m_GatherTeamButton.gameObject.SetActive(bRetShow); m_TeamFollowButton.gameObject.SetActive(bRetShow); m_DismissTeamButton.SetActive(bRetShow); } } GameObject curTab = m_TabController.GetHighlightTab().gameObject; if (null == curTab) { LogModule.ErrorLog("UpdateTeamInfo curTab is null"); return; } TabButton tabButton = m_TabController.GetTabButton("0"); if (null == tabButton) { LogModule.ErrorLog("UpdateTeamInfo tabButton is null"); return; } tabButton.gameObject.SetActive(true); if (m_TabGrid != null) { // m_TabGrid.repositionNow = true; m_TabGrid.Reposition(); } if (false == GameManager.gameManager.PlayerDataPool.IsHaveTeam()) { tabButton.gameObject.SetActive(false); } else { tabButton.gameObject.SetActive(true); } //if (m_TabGrid != null) //{ // m_TabGrid.repositionNow = true; //} if (GameManager.gameManager.PlayerDataPool.IsHaveTeam()) { if (curTab.name != "0") { ChangeTeamTab(TeamTab.TeamTab_TeamInfo); return; } //UIManager.LoadItem(UIInfo.PlayerListItem, OnLoadTeamItem, oLastSelectMemberGuid); ShowTeamInfoContent(oLastSelectMemberGuid); } else { ChangeTeamTab(TeamTab.TeamTab_NearPlayer); } }
public void ShowTab() { if (m_MasterTabController.GetTabButton("1MasterInfoTab") == null || m_MasterTabController.GetTabButton("2MasterMemberTab") == null || m_MasterTabController.GetTabButton("3MasterCheckLisctTab") == null || m_MasterTabController.GetTabButton("4MasterJoinTab") == null || m_MasterTabController.GetTabButton("5MasterCreateTab") == null || m_MasterTabController.GetTabButton("6MasterShopTab") == null) { return; } m_MasterTabController.GetTabButton("1MasterInfoTab").gameObject.SetActive(false); m_MasterTabController.GetTabButton("2MasterMemberTab").gameObject.SetActive(false); m_MasterTabController.GetTabButton("3MasterCheckLisctTab").gameObject.SetActive(false); m_MasterTabController.GetTabButton("4MasterJoinTab").gameObject.SetActive(false); m_MasterTabController.GetTabButton("5MasterCreateTab").gameObject.SetActive(false); m_MasterTabController.GetTabButton("6MasterShopTab").gameObject.SetActive(false); //无师门 或 待审批 => 加入师门 创建师门 if (GameManager.gameManager.PlayerDataPool.IsHaveMaster() == false || GameManager.gameManager.PlayerDataPool.IsMasterReserveMember() == true) { m_MasterTabController.GetTabButton("4MasterJoinTab").gameObject.SetActive(true); m_MasterTabController.GetTabButton("5MasterCreateTab").gameObject.SetActive(true); m_MasterTabController.GetTabButton("6MasterShopTab").gameObject.SetActive(true); m_MasterTabController.ChangeTab("4MasterJoinTab"); } //有师门 并 非掌门 => 师门信息 师门成员 if (GameManager.gameManager.PlayerDataPool.IsHaveMaster() == true && GameManager.gameManager.PlayerDataPool.IsMasterChief() == false && GameManager.gameManager.PlayerDataPool.IsMasterReserveMember() == false) { m_MasterTabController.GetTabButton("1MasterInfoTab").gameObject.SetActive(true); m_MasterTabController.GetTabButton("2MasterMemberTab").gameObject.SetActive(true); m_MasterTabController.GetTabButton("6MasterShopTab").gameObject.SetActive(true); m_MasterTabController.ChangeTab("1MasterInfoTab"); } //有师门 并 是掌门 => 师门信息 师门成员 审批列表 if (GameManager.gameManager.PlayerDataPool.IsHaveMaster() == true && GameManager.gameManager.PlayerDataPool.IsMasterChief() == true && GameManager.gameManager.PlayerDataPool.IsMasterReserveMember() == false) { m_MasterTabController.GetTabButton("1MasterInfoTab").gameObject.SetActive(true); m_MasterTabController.GetTabButton("2MasterMemberTab").gameObject.SetActive(true); m_MasterTabController.GetTabButton("3MasterCheckLisctTab").gameObject.SetActive(true); m_MasterTabController.GetTabButton("6MasterShopTab").gameObject.SetActive(true); m_MasterTabController.ChangeTab("1MasterInfoTab"); } if (m_MasterTabGrid != null) { m_MasterTabGrid.GetComponent <UIGrid>().Reposition(); } }