示例#1
0
        public override void Execute(INotification notification)
        {
            Debug.Log("Sub1");
            OtherDataProxy otherProxy = Facade.RetrieveProxy(OtherDataProxy.NAME) as OtherDataProxy;

            if (otherProxy.GetLives() <= 0)
            {
                return;
            }
            otherProxy.StartTry();
        }
示例#2
0
        public GameMediator(object viewComponent) : base(NAME, viewComponent)
        {
            View = ((GameObject)ViewComponent).GetComponentInChildren <GameView>(true);
            Debug.Log("game mediator");
            otherData  = Facade.RetrieveProxy(OtherDataProxy.NAME) as OtherDataProxy;
            playerData = Facade.RetrieveProxy(PlayerDataProxy.NAME) as PlayerDataProxy;
            // levelData = Facade.RetrieveProxy(LevelProxy.NAME) as LevelProxy;

            View.Portal.Enter += Enter;

            View.UpdateScore(playerData.PlayerData.RewardTotal);
        }
示例#3
0
        public MainPanelMediator(object viewComponent) : base(NAME, viewComponent)
        {
            View = ((GameObject)ViewComponent).GetComponent <MainPanelView>();
            View.gameObject.SetActive(true);
            Debug.Log("panel mediator");
            otherData = Facade.RetrieveProxy(OtherDataProxy.NAME) as OtherDataProxy;

            View.ButtonPlay.onClick.AddListener(OnClickPlay);
            View.ButtonLeaders.onClick.AddListener(OnClickLeaders);
            View.ButtonResetLives.onClick.AddListener(OnClickResetLives);
            View.ButtonExit.onClick.AddListener(OnClickExit);
            View.UpdateLives(otherData.GetLives());
        }
示例#4
0
        public override void Execute(INotification notification)
        {
            OtherDataProxy proxy = MyFacade.Instance.RetrieveProxy(OtherDataProxy.NAME) as OtherDataProxy;

            proxy.ResetTries();
        }