/// <summary> /// 进入该模块 要初始化 /// </summary> /// <param name="gameModuleType"></param> public void InitGameModule(GameModuleType gameModuleType) { // //Action closeMaskAction = null; InitGameModuleManager(gameModuleType); ChangeGameModule(gameModuleType); }
private void OnModuleOpen(GameModuleType module) { if (module == GameModuleType.BuildSetGun) { RefreshData(); } }
private void OnModuleOpen(GameModuleType module) { if (module == GameModuleType.IdleReward) { IdleRewardNode.gameObject.SetActive(true); QuickIdleNode.gameObject.SetActive(true); } }
private void OnModuleOpen(GameModuleType module) { switch (module) { case GameModuleType.Expedition: RefreshGoldAddBtnActive(); break; case GameModuleType.ShopTab: RefreshDiamondAddBtnActive(); break; } }
private void OnModuleOpen(GameModuleType module) { switch (module) { case GameModuleType.BuildInteraction: CampsiteBubbleRoot.gameObject.SetActive(true); break; case GameModuleType.Expedition: ExpeditionBtn.gameObject.SetActive(true); break; } }
/// <summary> /// 切换游戏模块 /// </summary> /// <param name="gameModuleType"></param> public void InitPanel(GameModuleType gameModuleType) { CloseAllPanel(trans_commonPanelParent); CloseAllPanel(trans_layer2); //CloseAllPanel(trans_layer3); //后续根据当前是什么场景 switch (gameModuleType) { case GameModuleType.WeekDay: OpenPanel <WorkDayPanel>(trans_commonPanelParent); //OpenPanel<PropertyPanel>(trans_commonPanelParent); OpenPanel <DeskPanel>(trans_commonPanelParent); OpenPanel <StatusPanel>(trans_layer2); OpenPanel <MainPanel>(trans_layer2); break; case GameModuleType.Battle: break; case GameModuleType.Home: OpenPanel <HomePanel>(trans_commonPanelParent); OpenPanel <StatusPanel>(trans_layer2); OpenPanel <MainPanel>(trans_layer2); break; case GameModuleType.BigMap: OpenPanel <BigMapPanel>(trans_commonPanelParent); OpenPanel <StatusPanel>(trans_layer2); OpenPanel <MainPanel>(trans_layer2); break; case GameModuleType.SingleOutsideScene: if (RoleManager.Instance._CurGameInfo.CurActionData.ActionId == (int)ActionIdType.DoMockExam) { PanelManager.Instance.OpenPanel <ExamPreparePanel>(PanelManager.Instance.trans_layer2); } else { OpenPanel <OutsidePanel>(trans_commonPanelParent, SocializationManager.Instance.action_planDic[RoleManager.Instance.playerPeople.protoData.ChoosedActionId]); //OpenPanel<BigMapPanel>(trans_commonPanelParent); OpenPanel <StatusPanel>(trans_layer2); OpenPanel <MainPanel>(trans_layer2); } break; } }
/// <summary> /// 换模块 /// </summary> /// <param name="gameModuleType"></param> public void ChangeGameModule(GameModuleType gameModuleType) { PanelManager.Instance.PingPongBlackMask(() => { RoleManager.Instance._CurGameInfo.CurGameModule = (int)gameModuleType; curGameModule = gameModuleType; //(GameModuleType)RoleManager.Instance._CurGameInfo.CurGameModule; //初始化模块的panel PanelManager.Instance.InitPanel(curGameModule); }, curCloseMaskAction); }
private void OnModuleOpen(GameModuleType module) { switch (module) { case GameModuleType.ShopTab: { shop.shop.Lockimg.gameObject.SetActive(false); } break; case GameModuleType.GunTab: { weapon.weapon.Lockimg.gameObject.SetActive(false); } break; } }
/// <summary> /// 初始化模块的系统 /// </summary> public void InitGameModuleManager(GameModuleType gameModuleType) { switch (gameModuleType) { case GameModuleType.WeekDay: curCloseMaskAction = delegate { GameTimeManager.Instance.startMove = true; }; break; case GameModuleType.Home: //邀约 curCloseMaskAction = null; SocializationManager.Instance.StartNewInvite(); if (GameTimeManager.Instance._CurTimeData.TheWeekDay == 7) { //给体力25 RoleManager.Instance.AddProperty(PropertyIdType.TiLi, 25); } break; case GameModuleType.SingleOutsideScene: //邀约 RoleManager.Instance._CurGameInfo.CurActionData = new RoleData.ActionData(); RoleManager.Instance._CurGameInfo.CurActionData.ActionId = RoleManager.Instance.playerPeople.protoData.ChoosedActionId; if (RoleManager.Instance._CurGameInfo.CurActionData.ActionId == (int)ActionIdType.DoMockExam) { curCloseMaskAction = null; } else { curCloseMaskAction = StartAction; } break; } }
public Action curCloseMaskAction;//完全亮起时需要执行的委托 public override void Init() { curGameModule = (GameModuleType)RoleManager.Instance._CurGameInfo.CurGameModule; base.Init(); }