private void DrawVariableDropdown(FieldInfo field, VariableAttribute varAttr) { List <string> variables = GetVariables(true); EditorGUILayout.LabelField(varAttr.label); object curGetterVariableName = field.GetValue(selectedNode); int index = 0; if (curGetterVariableName != null) { string varNameToString = curGetterVariableName.ToString(); index = variables.IndexOf(varNameToString); if (index < 0) { index = 0; } } int newIndex = EditorGUILayout.Popup(index, variables.ToArray()); if (newIndex > 0) { field.SetValue(selectedNode, variables[newIndex]); } else { field.SetValue(selectedNode, null); } }
public void ChangeManaUsable(VariableAttribute manaChangeVariableAttribute, bool myself) { if (myself) { myselfOnePlayerManaInfo.ChangeManaUsable(manaChangeVariableAttribute); } else { enemyOnePlayerManaInfo.ChangeManaUsable(manaChangeVariableAttribute); } }
public void UIManaInfoSysInit(VariableAttribute manaVariableAttribute, bool myself, string playerCodeNotification) { if (myself) { myselfOnePlayerManaInfo.UIManaInfoSysInit(manaVariableAttribute, playerCodeNotification); } else { enemyOnePlayerManaInfo.UIManaInfoSysInit(manaVariableAttribute, playerCodeNotification); } }
public void GetValue <T>(ref T local, string prop, VariableAttribute attr) { var cached = _settingsProvider.GetString(prop); if (cached == null) { return; } local = JsonConvert.DeserializeObject <T>(cached); }
public async Task <T> GetAsync <T>(string key, VariableAttribute attr) { try { return(await _dataCache.RetrieveData <T>( key, attr.ExpirationTime > 0?(TimeSpan?)TimeSpan.FromSeconds(attr.ExpirationTime) : null)); } catch (DataExpiredException) { return(default);
public void SetValue <T>(T value, string prop, VariableAttribute attr) { _settingsProvider.SetString( prop, value == null ? null : JsonConvert.SerializeObject(value)); }
public Holder(string propName, VariableAttribute attribute) { _attribute = attribute; _propName = attribute.CustomKey ?? propName; }
public Task SetAsync <T>(T data, string key, VariableAttribute attr) { return(_dataCache.SaveDataAsync(key, data)); }
public override void Execute(INotification notification) { PlayerGroupProxy playerGroupProxy = Facade.RetrieveProxy(PlayerGroupProxy.NAME) as PlayerGroupProxy; EffectInfoProxy effectInfoProxy = Facade.RetrieveProxy(EffectInfoProxy.NAME) as EffectInfoProxy; CardDbProxy cardDbProxy = Facade.RetrieveProxy(CardDbProxy.NAME) as CardDbProxy; HexGridProxy hexGridProxy = Facade.RetrieveProxy(HexGridProxy.NAME) as HexGridProxy; OperateSystemProxy operateSystemProxy = Facade.RetrieveProxy(OperateSystemProxy.NAME) as OperateSystemProxy; GameModelProxy gameModelProxy = Facade.RetrieveProxy(GameModelProxy.NAME) as GameModelProxy; QuestStageCircuitProxy questStageCircuitProxy = Facade.RetrieveProxy(QuestStageCircuitProxy.NAME) as QuestStageCircuitProxy; GameContainerProxy gameContainerProxy = Facade.RetrieveProxy(GameContainerProxy.NAME) as GameContainerProxy; switch (notification.Type) { case UIViewSystemEvent.UI_QUEST_STAGE_START_SPECIAL: TestCaseInfo chooseOneTestCase = notification.Body as TestCaseInfo; //读取默认设置 GameInterfacePreparationByGameModel(gameModelProxy, playerGroupProxy, questStageCircuitProxy, effectInfoProxy, gameContainerProxy, chooseOneTestCase.gameModelName); //读取存储json文件 foreach (PlayerItem playerItem in playerGroupProxy.playerGroup.playerItems.Values) { PI_Player pI_Player = new PI_Player(); if (playerItem.playerCode == "TEST1") { pI_Player = chooseOneTestCase.myselfPlayer; } else { pI_Player = chooseOneTestCase.enemyPlayer; } foreach (PI_GameContainer pI_GameContainer in pI_Player.gameContainerList) { List <CardEntry> cardEntries = new List <CardEntry>(); foreach (string cardCode in pI_GameContainer.gameContainerContent) { CardEntry cardEntry = cardDbProxy.GetCardEntryByCode(cardCode); cardEntry.controllerPlayerItem = playerItem; cardEntry.ttCardNeedAddToTTS(cardEntry); cardEntries.Add(cardEntry); } gameContainerProxy.AddCardListByPlayerItemAndGameContainerType(playerItem, pI_GameContainer.gameContainerType, cardEntries); } CardEntry shipCard = cardDbProxy.GetCardEntryByCode(pI_Player.shipCardCode); playerItem.shipCard = shipCard; //费用上限和可用费用 playerItem.LoadingManaInfo(pI_Player.manaUpperLimit, pI_Player.manaUpperLimit); //科技 foreach (string trait in pI_Player.traitList) { playerItem.traitCombination.AddTraitType(trait); } //生物渲染? foreach (PI_Minion pI_Minion in pI_Player.minionList) { HexCoordinates index = new HexCoordinates(pI_Minion.x, pI_Minion.z); CardEntry cardEntry = cardDbProxy.GetCardEntryByCode(pI_Minion.code); cardEntry.controllerPlayerItem = playerItem; gameContainerProxy.AddOneMinionByCard(index, cardEntry); gameContainerProxy.AddCardByPlayerItemAndGameContainerType(playerItem, "CardBattlefield", cardEntry); hexGridProxy.HexGrid.cellMap[index].inThisCellCardList.Add(cardEntry); } } questStageCircuitProxy.CircuitStart(playerGroupProxy.playerGroup.playerItems); foreach (PlayerItem playerItem in playerGroupProxy.playerGroup.playerItems.Values) { //刷新手牌是否可用 GameContainerItem gameContainerItem = gameContainerProxy.GetGameContainerItemByPlayerItemAndGameContainerType(playerItem, "CardHand"); //先开启手牌栏 SendNotification(HandSystemEvent.HAND_VIEW_SYS, null, StringUtil.GetNTByNotificationTypeAndPlayerCode(HandSystemEvent.HAND_VIEW_SYS_INIT_PLAYER_CODE, playerItem.playerCode)); //手牌渲染 SendNotification(HandSystemEvent.HAND_CHANGE, gameContainerItem, StringUtil.GetNTByNotificationTypeAndPlayerCode(HandSystemEvent.HAND_CHANGE_AFFLUX, playerItem.playerCode)); //获取船只的效果,如果是持续效果则添加到全局监听中 foreach (string effectCode in playerItem.shipCard.effectCodeList) { EffectInfo oneEffectInfo = effectInfoProxy.GetDepthCloneEffectByName(effectCode); if (oneEffectInfo.impactType == "Continue") { oneEffectInfo.player = playerItem; oneEffectInfo.cardEntry = playerItem.shipCard; questStageCircuitProxy.circuitItem.putOneEffectInfoInActiveMap(oneEffectInfo, effectInfoProxy.effectSysItem.impactTimeTriggerMap); } } VariableAttribute manaVariableAttribute = playerItem.playerVariableAttributeMap.variableAttributeMap["Mana"]; SendNotification(UIViewSystemEvent.UI_MANA_INFA_SYS, manaVariableAttribute, StringUtil.GetNTByNotificationTypeAndPlayerCode(UIViewSystemEvent.UI_MANA_INFA_SYS_INIT, playerItem.playerCode)); SendNotification(UIViewSystemEvent.UI_TRAIT_COMBINATION_SYS, playerItem.traitCombination.traitTypes, StringUtil.GetNTByNotificationTypeAndPlayerCode(UIViewSystemEvent.UI_TRAIT_COMBINATION_SYS_INIT, playerItem.playerCode)); } ShowSomeInCommonUseUIView(); SendNotification(UIViewSystemEvent.UI_QUEST_TURN_STAGE, null, UIViewSystemEvent.UI_QUEST_TURN_STAGE_ASSIGN_START_OF_TRUN); break; case UIViewSystemEvent.UI_QUEST_STAGE_START: //读取默认设置 GameInterfacePreparationByGameModel(gameModelProxy, playerGroupProxy, questStageCircuitProxy, effectInfoProxy, gameContainerProxy, "Andor"); questStageCircuitProxy.CircuitStart(playerGroupProxy.playerGroup.playerItems); foreach (PlayerItem playerItem in playerGroupProxy.playerGroup.playerItems.Values) { //创建牌库 List <CardEntry> cardEntryList = new List <CardEntry>(); for (int i = 0; i < 20; i++) { CardEntry cardEntry = new CardEntry(); if (i % 3 == 0) { //生物 cardEntry = cardDbProxy.GetCardEntryByCode("ImperialRecruit"); } else if (i % 3 == 1) { //事件 cardEntry = cardDbProxy.GetCardEntryByCode("FortifiedAgent"); } else { //资源 cardEntry = cardDbProxy.GetCardEntryByCode("TaxCar"); } cardEntry.controllerPlayerItem = playerItem; cardEntry.ttCardNeedAddToTTS(cardEntry); cardEntryList.Add(cardEntry); } gameContainerProxy.AddCardListByPlayerItemAndGameContainerType(playerItem, "CardDeck", cardEntryList); CardEntry shipCard = cardDbProxy.GetCardEntryByCode("FindWay"); playerItem.shipCard = shipCard; } foreach (PlayerItem playerItem in playerGroupProxy.playerGroup.playerItems.Values) { //先开启手牌栏 SendNotification(HandSystemEvent.HAND_VIEW_SYS, null, StringUtil.GetNTByNotificationTypeAndPlayerCode(HandSystemEvent.HAND_VIEW_SYS_INIT_PLAYER_CODE, playerItem.playerCode)); //分发手牌 playerItem.DrawCard(3); //设置起始费用上限1 //设置当前费用为0 playerItem.LoadingManaInfo(1, 0); //获取船只的效果,如果是持续效果则添加到全局监听中 foreach (string effectCode in playerItem.shipCard.effectCodeList) { EffectInfo oneEffectInfo = effectInfoProxy.GetDepthCloneEffectByName(effectCode); if (oneEffectInfo.impactType == "Continue") { oneEffectInfo.player = playerItem; oneEffectInfo.cardEntry = playerItem.shipCard; questStageCircuitProxy.circuitItem.putOneEffectInfoInActiveMap(oneEffectInfo, effectInfoProxy.effectSysItem.impactTimeTriggerMap); } } VariableAttribute manaVariableAttribute = playerItem.playerVariableAttributeMap.variableAttributeMap["Mana"]; SendNotification(UIViewSystemEvent.UI_MANA_INFA_SYS, manaVariableAttribute, StringUtil.GetNTByNotificationTypeAndPlayerCode(UIViewSystemEvent.UI_MANA_INFA_SYS_INIT, playerItem.playerCode)); SendNotification(UIViewSystemEvent.UI_TRAIT_COMBINATION_SYS, playerItem.traitCombination.traitTypes, StringUtil.GetNTByNotificationTypeAndPlayerCode(UIViewSystemEvent.UI_TRAIT_COMBINATION_SYS_INIT, playerItem.playerCode)); //手牌渲染 //SendNotification(HandSystemEvent.HAND_CHANGE, playerItem.handGridItem, StringUtil.NotificationTypeAddPlayerCode(HandSystemEvent.HAND_CHANGE_AFFLUX, playerItem.playerCode)); } ShowSomeInCommonUseUIView(); UtilityLog.Log("测试准备完成", LogUtType.Other); SendNotification(UIViewSystemEvent.UI_QUEST_TURN_STAGE, null, UIViewSystemEvent.UI_QUEST_TURN_STAGE_START_OF_TRUN); break; } }
public void ChangeManaUsable(VariableAttribute manaVariableAttribute) { manaUpperLimit.text = (manaVariableAttribute.valueMap[VATtrtype.OriginalValue]).ToString(); manaUsable.text = (manaVariableAttribute.valueMap[VATtrtype.OriginalValue] + manaVariableAttribute.valueMap[VATtrtype.ChangeValue] + manaVariableAttribute.valueMap[VATtrtype.DamageValue]).ToString(); }
public void UIManaInfoSysInit(VariableAttribute manaVariableAttribute, string playerCodeNotification) { manaUpperLimit.text = (manaVariableAttribute.valueMap[VATtrtype.OriginalValue]).ToString(); manaUsable.text = (manaVariableAttribute.valueMap[VATtrtype.OriginalValue] + manaVariableAttribute.valueMap[VATtrtype.ChangeValue] + manaVariableAttribute.valueMap[VATtrtype.DamageValue]).ToString(); playerCode = playerCodeNotification; }
public override void ExceHandleNotification(INotification notification) { //判断是否是转发内容 if (notification.Name.Contains("=>")) { SendNotification(StringUtil.GeNotificationNameForNN(notification.Name), notification.Body, notification.Type); return; } // 处理公共请求 HandleNotificationCommon(notification); ViewChooseStage viewChooseStage = null; List <CardDeckList> cardDeckListLoad = new List <CardDeckList>(); CardMoveAnimation cardMoveAnimation = null; //回调函数 UnityAction callBack = () => { exceINotification = false; SendNotification(UIViewSystemEvent.UI_ANIMATION_SYS, null, UIViewSystemEvent.UI_ANIMATION_SYS_START); }; bool callBackDelay = false; switch (notification.Name) { case UIViewSystemEvent.UI_ANIMATION_SYS: switch (notification.Type) { case UIViewSystemEvent.UI_ANIMATION_SYS_START: DoExceHandleNotification(); break; } break; case UIViewSystemEvent.UI_CARD_ENTRY_SYS: switch (notification.Type) { //卡牌的归属地发生了变化 case UIViewSystemEvent.UI_CARD_ENTRY_SYS_CHANGE_GAME_CONTAINER_TYPE: CardEntry cardEntryMove = notification.Body as CardEntry; if (cardEntryMove.gameContainerType == "CardHand") { SendNotification(HandSystemEvent.HAND_CHANGE, notification.Body, StringUtil.GetNTByNotificationTypeAndPlayerCode(HandSystemEvent.HAND_CHANGE_DRAW_ONE_CARD, cardEntryMove.controllerPlayerItem.playerCode)); return; } if (cardEntryMove.lastGameContainerType == "CardHand") { SendNotification(HandSystemEvent.HAND_CHANGE, cardEntryMove, StringUtil.GetNTByNotificationTypeAndPlayerCode(HandSystemEvent.HAND_CHANGE_REMOVE_ONE_CARD, cardEntryMove.controllerPlayerItem.playerCode)); } break; //卡牌在显示页面需要被隐藏 case UIViewSystemEvent.UI_CARD_ENTRY_SYS_CARD_NEED_HIDE_IN_VIEW: CardEntry cardEntryNeedHide = notification.Body as CardEntry; if (cardEntryNeedHide.gameContainerType == "CardHand") { SendNotification(HandSystemEvent.HAND_CHANGE, notification.Body, StringUtil.GetNTByNotificationTypeAndPlayerCode(UIViewSystemEvent.UI_CARD_ENTRY_SYS_CARD_NEED_HIDE_IN_VIEW, cardEntryNeedHide.controllerPlayerItem.playerCode)); } break; } break; case UIViewSystemEvent.UI_VIEW_CURRENT: switch (notification.Type) { case UIViewSystemEvent.UI_VIEW_CURRENT_OPEN_ONE_VIEW: //是否需要打开遮罩层 if (parameterMap.ContainsKey("OpenMaskLayer")) { string OpenMaskLayer = parameterMap["OpenMaskLayer"]; if ("Y" == OpenMaskLayer) { UIViewName uiMaskLayeView = UIViewConfig.getUIViewNameByNameStr("UIMaskLayeView"); UIControllerLIst.ShowView(uiMaskLayeView); } } UIViewName viewNameOpen = UIViewConfig.getUIViewNameByNameStr(parameterMap["UIViewName"]); UIControllerLIst.ShowView(viewNameOpen); //初始化页面 UIControllerLIst.GetViewByName <ViewBaseView>(viewNameOpen).InitViewForParameter(this, notification.Body, parameterMap); //一些界面打开时需要初始化 switch (viewNameOpen) { case UIViewName.CardDeckList: PlayerItem playerItem = notification.Body as PlayerItem; List <CardDeckList> cardDeckLists = UIControllerLIst.GetViewListByName <CardDeckList>(UIViewName.CardDeckList); for (int num = 0; num < cardDeckLists.Count; num++) { if (cardDeckLists[num].playerItem == null) { cardDeckLists[num].playerItem = playerItem; //设置位置 //0在左,1在右 //己方始终显示在左边 Vector3 position = new Vector3(); if (playerItem.playerCode == playerCode) { position.x = -600; } else { position.x = 430; } cardDeckLists[num].transform.localPosition = position; } } break; } break; case UIViewSystemEvent.UI_VIEW_CURRENT_CLOSE_ONE_VIEW: UIViewName viewNameClose = UIViewConfig.getUIViewNameByNameStr(notification.Body as string); UIControllerLIst.HideView(viewNameClose); //是否需要关闭遮罩层 if (parameterMap.ContainsKey("OpenMaskLayer")) { string OpenMaskLayer = parameterMap["OpenMaskLayer"]; if ("N" == OpenMaskLayer) { UIViewName uiMaskLayeView = UIViewConfig.getUIViewNameByNameStr("UIMaskLayeView"); UIControllerLIst.HideView(uiMaskLayeView); } } break; } break; case UIViewSystemEvent.UI_CHOOSE_STAGE: switch (notification.Type) { case UIViewSystemEvent.UI_CHOOSE_STAGE_LOAD_CARD_ENTRY: viewChooseStage = UIControllerLIst.GetViewByName <ViewChooseStage>(UIViewName.ChooseStage); List <CardEntry> shipCardEntryList = (List <CardEntry>)notification.Body; //载入卡牌列表 viewChooseStage.LoadCardEntryList(shipCardEntryList); //载入完成后绑定事件 foreach (CardIntactView cardIntactView in viewChooseStage.cardIntactViews) { //如果是自己的命令则绑定上点击事件 if (playerCode == playerCodeNotification) { cardIntactView.OnClick = () => { SendNotification(UIViewSystemEvent.UI_CHOOSE_STAGE, cardIntactView.card, UIViewSystemEvent.UI_CHOOSE_STAGE_ONE_CARD); }; } else { //设置为空 cardIntactView.OnClick = () => { }; } } break; case UIViewSystemEvent.UI_CHOOSE_STAGE_ONE_SHIP_CARD_ANIMATION: viewChooseStage = UIControllerLIst.GetViewByName <ViewChooseStage>(UIViewName.ChooseStage); CardEntry choosedShipCard = notification.Body as CardEntry; CardIntactView targetCardIntactView = null; //找到这张组件 foreach (CardIntactView cardIntactView in viewChooseStage.cardIntactViews) { if (cardIntactView.card.uuid == choosedShipCard.uuid) { cardDeckListLoad = UIControllerLIst.GetViewListByName <CardDeckList>(UIViewName.CardDeckList); cardMoveAnimation = UIControllerLIst.GetViewByName <CardMoveAnimation>(UIViewName.CardMoveAnimation); //执行动画,获得卡牌的位置,list的位置 for (int num = 0; num < cardDeckListLoad.Count; num++) { //移动目标 if (cardDeckListLoad[num].playerItem.playerCode == playerCodeNotification) { callBackDelay = true; cardMoveAnimation.MoveShipCardAnimation(cardIntactView, cardDeckListLoad[num], callBack); } } } } break; } break; case UIViewSystemEvent.UI_CHOOSE_MAKE_STAGE: ViewChooseMakeStage viewChooseMakeStage = UIControllerLIst.GetViewByName <ViewChooseMakeStage>(UIViewName.ViewChooseMakeStage); switch (notification.Type) { //获取下一组数据 case UIViewSystemEvent.UI_CHOOSE_MAKE_STAGE_LOAD_NEXT_LIST: List <CardEntry> cardList = notification.Body as List <CardEntry>; viewChooseMakeStage = UIControllerLIst.GetViewByName <ViewChooseMakeStage>(UIViewName.ViewChooseMakeStage); viewChooseMakeStage.LoadNewCardList(cardList); break; case UIViewSystemEvent.UI_CHOOSE_MAKE_STAGE_ONE_CARD_SUCCESS: CardEntry card = notification.Body as CardEntry; viewChooseMakeStage.ChangeOneCradForBuyed(card); break; } break; case UIViewSystemEvent.UI_CARD_DECK_LIST: switch (notification.Type) { //读取牌组 case UIViewSystemEvent.UI_CARD_DECK_LIST_LOAD: PlayerItem playerItemLoad = notification.Body as PlayerItem; cardDeckListLoad = UIControllerLIst.GetViewListByName <CardDeckList>(UIViewName.CardDeckList); for (int num = 0; num < cardDeckListLoad.Count; num++) { if (cardDeckListLoad[num].playerItem.playerCode == playerItemLoad.playerCode) { cardDeckListLoad[num].LoadPlayerInfo(); foreach (CardHeadView cardHeadView in cardDeckListLoad[num].cardHeadViews) { cardHeadView.OnPointerEnter = () => { SendNotification( UIViewSystemEvent.UI_VIEW_CURRENT, cardHeadView, StringUtil.GetNTByNotificationTypeAndUIViewNameAndOtherType( UIViewSystemEvent.UI_VIEW_CURRENT_OPEN_ONE_VIEW, UIViewConfig.getNameStrByUIViewName(UIViewName.OneCardAllInfo), "CardHeadView" ) ); }; cardHeadView.OnPointerExit = () => { SendNotification( UIViewSystemEvent.UI_VIEW_CURRENT, UIViewConfig.getNameStrByUIViewName(UIViewName.OneCardAllInfo), UIViewSystemEvent.UI_VIEW_CURRENT_CLOSE_ONE_VIEW); }; } } } break; } break; //费用控制组件 case UIViewSystemEvent.UI_MANA_INFA_SYS: int changeNum = 0; ManaInfoView manaInfoView = null; switch (notification.Type) { case UIViewSystemEvent.UI_MANA_INFA_SYS_INIT: VariableAttribute manaInitVariableAttribute = notification.Body as VariableAttribute; manaInfoView = UIControllerLIst.GetViewByName <ManaInfoView>(UIViewName.ManaInfoView); manaInfoView.UIManaInfoSysInit(manaInitVariableAttribute, myself, playerCodeNotification); break; case UIViewSystemEvent.UI_MANA_INFA_SYS_NUM_CHANGE: VariableAttribute manaChangeVariableAttribute = notification.Body as VariableAttribute; manaInfoView = UIControllerLIst.GetViewByName <ManaInfoView>(UIViewName.ManaInfoView); manaInfoView.ChangeManaUsable(manaChangeVariableAttribute, myself); break; } break; //科技组件显示 case UIViewSystemEvent.UI_TRAIT_COMBINATION_SYS: TraitCombinationView traitCombinationView = null; switch (notification.Type) { case UIViewSystemEvent.UI_TRAIT_COMBINATION_SYS_INIT: List <TraitType> traitTypes = notification.Body as List <TraitType>; traitCombinationView = UIControllerLIst.GetViewByName <TraitCombinationView>(UIViewName.TraitCombinationView); traitCombinationView.UITraitCombinationSysInit(traitTypes, myself, playerCodeNotification); break; case UIViewSystemEvent.UI_TRAIT_COMBINATION_SYS_ADD: string traitType = notification.Body.ToString(); traitCombinationView = UIControllerLIst.GetViewByName <TraitCombinationView>(UIViewName.TraitCombinationView); traitCombinationView.UITraitCombinationSysAdd(traitType, myself); break; } break; //效果展示列控制 case UIViewSystemEvent.UI_EFFECT_DISPLAY_SYS: EffectDisplayView effectDisplayView = null; switch (notification.Type) { case UIViewSystemEvent.UI_EFFECT_DISPLAY_SYS_PUT_ONE_EFFECT: effectDisplayView = UIControllerLIst.GetViewByName <EffectDisplayView>(UIViewName.EffectDisplayView); CardEntry effectCardNeedShow = notification.Body as CardEntry; callBackDelay = true; //回调函数 callBack = () => { exceINotification = false; SendNotification(EffectExecutionEvent.EFFECT_EXECUTION_SYS, null, EffectExecutionEvent.EFFECT_EXECUTION_SYS_EFFECT_SHOW_OVER); SendNotification(UIViewSystemEvent.UI_ANIMATION_SYS, null, UIViewSystemEvent.UI_ANIMATION_SYS_START); }; effectDisplayView.ShowCradEffectByCardEntryAuto(effectCardNeedShow, callBack); break; case UIViewSystemEvent.UI_EFFECT_DISPLAY_SYS_ONE_EFFECT_NEED_CHOOSE_EXE: effectDisplayView = UIControllerLIst.GetViewByName <EffectDisplayView>(UIViewName.EffectDisplayView); CardEntry effectCardNeedChooseExe = notification.Body as CardEntry; SendNotificationAddCardEntry sendNotificationAddCard = (OneUserSelectionItem oneUserSelectionItem) => { SendNotification(OperateSystemEvent.OPERATE_SYS, oneUserSelectionItem, OperateSystemEvent.OPERATE_SYS_CHOOSE_ONE_USER_SELECTION_ITEM); }; effectDisplayView.ShowCradEffectAndUserSelectionListByCardEntry(effectCardNeedChooseExe, sendNotificationAddCard); break; case UIViewSystemEvent.UI_EFFECT_DISPLAY_SYS_ONE_EFFECT_NEED_CHOOSE_TARGET: effectDisplayView = UIControllerLIst.GetViewByName <EffectDisplayView>(UIViewName.EffectDisplayView); CardEntry effectCardNeedChooseTarget = notification.Body as CardEntry; effectDisplayView.ShowCradEffectByCardEntry(effectCardNeedChooseTarget); break; case UIViewSystemEvent.UI_EFFECT_DISPLAY_SYS_TO_HIDE: effectDisplayView = UIControllerLIst.GetViewByName <EffectDisplayView>(UIViewName.EffectDisplayView); effectDisplayView.cardIntactView.gameObject.SetActive(false); break; } break; //科技组件显示 case UIViewSystemEvent.UI_PLAYER_SCORE_SHOW_SYS: switch (notification.Type) { case UIViewSystemEvent.UI_PLAYER_SCORE_SHOW_SYS_CHANGE: ShipComponentView shipScoreComponentView = UIControllerLIst.GetViewByName <ShipComponentView>(UIViewName.ShipComponentView); shipScoreComponentView.ChangeScoreShow(myself, Convert.ToInt32(notification.Body)); break; } break; //结束按钮的显示控制 case UIViewSystemEvent.UI_NEXT_TURN_SHOW_SYS: NextTurnButton nextTurnButton = null; switch (notification.Type) { case UIViewSystemEvent.UI_NEXT_TURN_SHOW_SYS_SHOW: if (myself) { nextTurnButton = UIControllerLIst.GetViewByName <NextTurnButton>(UIViewName.NextTurnButton); nextTurnButton.ShowButton(); } break; } break; //展示卡牌完整信息的控制 case UIViewSystemEvent.UI_ONE_CARD_ALL_INFO: switch (notification.Type) { case UIViewSystemEvent.UI_ONE_CARD_ALL_INFO_BUFF_CHANGE: CardEntry minionCellItem = notification.Body as CardEntry; OneCardAllInfo oneCardAllInfo = UIControllerLIst.GetViewByName <OneCardAllInfo>(UIViewName.OneCardAllInfo); if (oneCardAllInfo != null) { if (oneCardAllInfo.cardEntryShow.uuid == minionCellItem.uuid) { oneCardAllInfo.LoadingAllInfoByMinionCellItem(minionCellItem); } } break; } break; case UIViewSystemEvent.UI_TURN_STAGE_SYS: switch (notification.Type) { case UIViewSystemEvent.UI_TURN_STAGE_SYS_STAGE_CHANGE: //回调函数 UnityAction turnStageCallBack = () => { SendNotification(EffectExecutionEvent.EFFECT_EXECUTION_SYS, null, EffectExecutionEvent.EFFECT_EXECUTION_SYS_EFFECT_SHOW_OVER); SendNotification(UIViewSystemEvent.UI_ANIMATION_SYS, null, UIViewSystemEvent.UI_ANIMATION_SYS_START); }; TurnSysProgressBarView turnSysProgressBarView = UIControllerLIst.GetViewByName <TurnSysProgressBarView>(UIViewName.TurnSysProgressBarView); QuestStageCircuitItem questStageCircuitItem = notification.Body as QuestStageCircuitItem; turnSysProgressBarView.LoadingAllStageInfoToChange(questStageCircuitItem, playerCode, turnStageCallBack); break; } break; } if (callBackDelay == false) { callBack(); } }