Exemplo n.º 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();
        }
Exemplo n.º 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);
        }
Exemplo n.º 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());
        }
Exemplo n.º 4
0
        public override void Execute(INotification notification)
        {
            OtherDataProxy proxy = MyFacade.Instance.RetrieveProxy(OtherDataProxy.NAME) as OtherDataProxy;

            proxy.ResetTries();
        }