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