示例#1
0
 //制造可召唤区域列表
 public void CreateCanCallHex(GM_PlayerSite playerSiteOne)
 {
     foreach (string canCallRegionCode in playerSiteOne.canCallRegionCodes)
     {
         foreach (GM_CellRegion gmCellRegion in playerSiteOne.cellRegionList)
         {
             if (gmCellRegion.code == canCallRegionCode)
             {
                 foreach (GM_CellCoordinate gMCell in gmCellRegion.regionCellList)
                 {
                     fixedCanCallHexList.Add(new HexCoordinates(gMCell.x, gMCell.z));
                 }
             }
         }
     }
 }
示例#2
0
        //读取模式并做出一定的设置
        public void GameInterfacePreparationByGameModel(GameModelProxy gameModelProxy,
                                                        PlayerGroupProxy playerGroupProxy,
                                                        QuestStageCircuitProxy questStageCircuitProxy,
                                                        EffectInfoProxy effectInfoProxy,
                                                        GameContainerProxy gameContainerProxy,
                                                        string gameModelName)
        {
            gameModelProxy.setGameModelNow(gameModelName);

            HexGridProxy hexGridProxy = Facade.RetrieveProxy(HexGridProxy.NAME) as HexGridProxy;

            hexGridProxy.InitializeTheProxy(gameModelProxy.hexModelInfoNow);

            int number = 0;

            foreach (PlayerItem playerItem in playerGroupProxy.playerGroup.playerItems.Values)
            {
                GM_PlayerSite playerSiteOne = gameModelProxy.gameModelNow.playerSiteList[number];
                playerItem.LoadingGameModelPlayerSet(playerSiteOne);
                gameContainerProxy.CreateNecessaryContainer(playerItem, gameModelProxy.gameModelNow.gameContainerTypeList);
                number++;
            }
            //初始化流程信息
            //将流程需要的监听放入到监听效果集合中
            for (int n = 0; n < gameModelProxy.gameModelNow.turnStage.Length; n++)
            {
                GM_OneStageSite oneStageSite = gameModelProxy.stageSiteMap[gameModelProxy.gameModelNow.turnStage[n]];
                questStageCircuitProxy.circuitItem.questOneTurnStageList.Add(oneStageSite);
                foreach (string effectCode in oneStageSite.effectNeedExeList)
                {
                    //创建空的实体信息,在执行的时候会用到
                    EffectInfo oneEffectInfo = effectInfoProxy.GetDepthCloneEffectByName(effectCode);
                    CardEntry  cardEntry     = new CardEntry();
                    PlayerItem player        = new PlayerItem("NONE");
                    oneEffectInfo.cardEntry = cardEntry;
                    oneEffectInfo.player    = player;

                    if (oneEffectInfo.impactType == "GameModelRule")
                    {
                        questStageCircuitProxy.circuitItem.putOneEffectInfoInActiveMap(oneEffectInfo, effectInfoProxy.effectSysItem.impactTimeTriggerMap);
                    }
                }
            }

            //通知渲染战场
            SendNotification(HexSystemEvent.HEX_VIEW_SYS, null, HexSystemEvent.HEX_VIEW_SYS_SHOW_START);
            //渲染费用栏
            SendNotification(
                UIViewSystemEvent.UI_VIEW_CURRENT,
                null,
                StringUtil.GetNTByNotificationTypeAndUIViewName(
                    UIViewSystemEvent.UI_VIEW_CURRENT_OPEN_ONE_VIEW,
                    UIViewConfig.getNameStrByUIViewName(UIViewName.ManaInfoView)
                    )
                );
            //渲染科技栏
            SendNotification(
                UIViewSystemEvent.UI_VIEW_CURRENT,
                null,
                StringUtil.GetNTByNotificationTypeAndUIViewName(
                    UIViewSystemEvent.UI_VIEW_CURRENT_OPEN_ONE_VIEW,
                    UIViewConfig.getNameStrByUIViewName(UIViewName.TraitCombinationView)
                    )
                );
            //渲染船只栏
            SendNotification(
                UIViewSystemEvent.UI_VIEW_CURRENT,
                null,
                StringUtil.GetNTByNotificationTypeAndUIViewName(
                    UIViewSystemEvent.UI_VIEW_CURRENT_OPEN_ONE_VIEW,
                    UIViewConfig.getNameStrByUIViewName(UIViewName.ShipComponentView)
                    )
                );
            //打开回合控制栏
            SendNotification(
                UIViewSystemEvent.UI_VIEW_CURRENT,
                questStageCircuitProxy.circuitItem.questOneTurnStageList,
                StringUtil.GetNTByNotificationTypeAndUIViewName(
                    UIViewSystemEvent.UI_VIEW_CURRENT_OPEN_ONE_VIEW,
                    UIViewConfig.getNameStrByUIViewName(UIViewName.TurnSysProgressBarView)
                    )
                );
        }
示例#3
0
 //读取游戏模式设定中的玩家设定
 public void LoadingGameModelPlayerSet(GM_PlayerSite playerSiteOne)
 {
     this.playerSiteOne = playerSiteOne;
     CreateCanCallHex(playerSiteOne);
     CreateCanMoveHex(playerSiteOne);
 }