Esempio n. 1
0
        public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
        {
            List <CardEntry> cardEntries = body as List <CardEntry>;

            //载入卡牌列表
            this.LoadCardEntryList(cardEntries);
            //载入完成后绑定事件
            foreach (CardIntactView cardIntactView in this.cardIntactViews)
            {
                //如果是自己的命令则绑定上点击事件
                if (mediator.playerCode == parameterMap["PlayerCode"])
                {
                    cardIntactView.OnClick = () =>
                    {
                        mediator.SendNotification(OperateSystemEvent.OPERATE_SYS, cardIntactView.card, OperateSystemEvent.OPERATE_SYS_CHOOSE_ONE_EFFECT);
                    };
                }
                else
                {
                    //设置为空
                    cardIntactView.OnClick = () =>
                    {
                    };
                }
            }
        }
Esempio n. 2
0
        public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
        {
            List <List <CardEntry> > cardEntries = body as List <List <CardEntry> >;

            this.LoadStartCardList(cardEntries);
            foreach (ViewChooseStage oneViewChoose in this.sortViewChosseMap.Values)
            {
                foreach (CardIntactView cardIntactView in oneViewChoose.cardIntactViews)
                {
                    if (cardIntactView.card.layerSort == VCSLayerSort.Three)
                    {
                        cardIntactView.OnClick = () =>
                        {
                            //提示第三排为展示,不可购买
                            cardIntactView.OnClick = () =>
                            {
                            };
                        };
                    }
                    else
                    {
                        cardIntactView.OnClick = () =>
                        {
                            mediator.SendNotification(UIViewSystemEvent.UI_CHOOSE_MAKE_STAGE, cardIntactView.card, UIViewSystemEvent.UI_CHOOSE_MAKE_STAGE_ONE_CARD);
                        };
                    }
                }
            }
        }
Esempio n. 3
0
 public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
 {
     this.OnPointerClick = () =>
     {
         mediator.SendNotification(OperateSystemEvent.OPERATE_SYS, mediator.playerCode, OperateSystemEvent.OPERATE_SYS_GRAVEYARD_LIST_LOAD);
     };
     this.InitView();
 }
Esempio n. 4
0
 public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
 {
     this.OnPointerClick = () =>
     {
         mediator.SendNotification(UIViewSystemEvent.UI_QUEST_TURN_STAGE, null, UIViewSystemEvent.UI_QUEST_TURN_STAGE_END_OF_STAGE);
         this.HideButton();
     };
     this.InitView();
 }
Esempio n. 5
0
        public override void Execute(INotification notification)
        {
            MainUI mainUI = notification.Body as MainUI;

            if (null == mainUI)
            {
                throw new Exception("程序启动失败..");
            }

            //数据信息代理
            CardDbProxy cardDbProxy = new CardDbProxy();

            Facade.RegisterProxy(cardDbProxy);
            EffectInfoProxy effectInfoProxy = new EffectInfoProxy();

            Facade.RegisterProxy(effectInfoProxy);
            TestCaseProxy testCaseProxy = new TestCaseProxy();

            Facade.RegisterProxy(testCaseProxy);
            //游戏模式代理
            GameModelProxy gameModelProxy = new GameModelProxy();

            Facade.RegisterProxy(gameModelProxy);

            //UI层代理
            UIControllerListMediator uIControllerListMediator = new UIControllerListMediator(mainUI.UIControllerListView);

            Facade.RegisterMediator(uIControllerListMediator);



            //玩家组代理
            PlayerGroupProxy playerGroupProxy = new PlayerGroupProxy();

            Facade.RegisterProxy(playerGroupProxy);

            //游戏容器代理
            GameContainerProxy gameContainerProxy = new GameContainerProxy();

            Facade.RegisterProxy(gameContainerProxy);



            //选择阶段进程代理
            ChooseStageCircuitProxy chooseStageCircuitProxy = new ChooseStageCircuitProxy();

            Facade.RegisterProxy(chooseStageCircuitProxy);



            SendNotification(OrderSystemEvent.START_CIRCUIT, mainUI, OrderSystemEvent.START_CIRCUIT_MAIN);
        }
Esempio n. 6
0
        public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
        {
            List <TestCaseInfo> testCaseInfoList = body as List <TestCaseInfo>;

            this.addTestCase(testCaseInfoList);
            foreach (OneTestCase oneTestCase in this.testCaseList.oneTestCaseList)
            {
                oneTestCase.OnClick = () =>
                {
                    mediator.SendNotification(OrderSystemEvent.START_CIRCUIT, oneTestCase.testCaseInfo, OrderSystemEvent.START_CIRCUIT_TEST_CASE_START_ONE);
                };
            }
            ;
        }
Esempio n. 7
0
 public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
 {
     if (parameterMap["OtherType"] == "CardHeadView")
     {
         CardHeadView cardHeadView = body as CardHeadView;
         this.cardEntryShow = cardHeadView.card;
         this.LoadCardInfo(cardHeadView.card);
     }
     else if (parameterMap["OtherType"] == "MinionCellView")
     {
         MinionCellView minionCellView = body as MinionCellView;
         this.cardEntryShow = minionCellView.minionCellItem;
         LoadingAllInfoByMinionCellView(minionCellView);
     }
 }
Esempio n. 8
0
 public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
 {
     this.StartCompleteGameUnityAction += () =>
     {
         mediator.SendNotification(UIViewSystemEvent.UI_VIEW_CURRENT, UIViewConfig.getNameStrByUIViewName(UIViewName.StartMain), UIViewSystemEvent.UI_VIEW_CURRENT_CLOSE_ONE_VIEW);
         mediator.SendNotification(OrderSystemEvent.START_CIRCUIT, null, OrderSystemEvent.START_CIRCUIT_START);
     };
     this.StartTestMapUnityAction += () =>
     {
         mediator.SendNotification(UIViewSystemEvent.UI_VIEW_CURRENT, UIViewConfig.getNameStrByUIViewName(UIViewName.StartMain), UIViewSystemEvent.UI_VIEW_CURRENT_CLOSE_ONE_VIEW);
         mediator.SendNotification(OrderSystemEvent.START_CIRCUIT, null, OrderSystemEvent.START_CIRCUIT_TEST_MAP);
     };
     this.StartTestCaseUnityAction += () =>
     {
         mediator.SendNotification(UIViewSystemEvent.UI_VIEW_CURRENT, UIViewConfig.getNameStrByUIViewName(UIViewName.StartMain), UIViewSystemEvent.UI_VIEW_CURRENT_CLOSE_ONE_VIEW);
         mediator.SendNotification(OrderSystemEvent.START_CIRCUIT, null, OrderSystemEvent.START_CIRCUIT_TEST_CASE);
     };
 }
Esempio n. 9
0
        public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
        {
            GameContainerItem cardGraveyard = body as GameContainerItem;

            graveyardListOne.InitView(cardGraveyard);
            this.graveyardListExit.OnPointerClick = () => {
                //关闭墓地页面
                mediator.SendNotification(
                    UIViewSystemEvent.UI_VIEW_CURRENT,
                    UIViewConfig.getNameStrByUIViewName(UIViewName.GraveyardListView),
                    StringUtil.GetNTByNotificationTypeAndUIViewNameAndMaskLayer(
                        UIViewSystemEvent.UI_VIEW_CURRENT_CLOSE_ONE_VIEW,
                        UIViewConfig.getNameStrByUIViewName(UIViewName.GraveyardListView),
                        "N"
                        )
                    );
            };
        }
Esempio n. 10
0
        public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
        {
            List <GM_OneStageSite> questOneTurnStageList = body as List <GM_OneStageSite>;
            Vector3 postion = this.transform.position;

            postion.x = postion.x - 8.47f;
            this.transform.position = postion;
            //头占10像素
            int oneStageHight = 300 / questOneTurnStageList.Count;

            for (int n = 0; n < questOneTurnStageList.Count; n++)
            {
                TurnSysOneStageView turnSysOneStageView = Instantiate <TurnSysOneStageView>(turnSysOneStagePrefab);
                Vector3             position            = new Vector3();
                position.y = 120 - oneStageHight * n;
                position.x = 50;
                turnSysOneStageView.transform.SetParent(transform, false);
                turnSysOneStageView.transform.localPosition = position;
                turnSysOneStageView.LoadingOneStageInfo(questOneTurnStageList[n], false, false);
                turnSysOneStageViewList.Add(turnSysOneStageView);
            }
        }
Esempio n. 11
0
 public override void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
 {
     this.myselfPlayerCode = mediator.playerCode;
 }
Esempio n. 12
0
 //需要通过传递参数和引用消息系统的初始化
 public virtual void InitViewForParameter(UIControllerListMediator mediator, object body, Dictionary <string, string> parameterMap)
 {
 }