public override void Execute(INotification notification) { Debug.Log("Sub1"); OtherDataProxy otherProxy = Facade.RetrieveProxy(OtherDataProxy.NAME) as OtherDataProxy; if (otherProxy.GetLives() <= 0) { return; } otherProxy.StartTry(); }
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); }
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()); }
public override void Execute(INotification notification) { OtherDataProxy proxy = MyFacade.Instance.RetrieveProxy(OtherDataProxy.NAME) as OtherDataProxy; proxy.ResetTries(); }