public void OnClickPlay() { Debug.Log("start game"); if (otherData.GetLives() <= 0) { return; } SendNotification(MyFacade.PLAY, otherData.GetCurrentLevel()); }
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 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()); }