public override void Execute(INotification notification) { UserProxy userProxy = ApplicationFacade.applicationInstance.RetrieveProxy <UserProxy>(); ApplicationFacade.applicationInstance.RegisterProxy <ShopProxy>(new ShopData(GetGoodsDataList())); ShopPanelMediator shopPanelMediator = ApplicationFacade.applicationInstance.RegisterAndRetrieveMediator <ShopPanelMediator>("Assets/Res/Prefabs/ShopPanel.prefab"); shopPanelMediator.UpdateAmount(userProxy.amount); ApplicationFacade.applicationInstance.RegisterAndSendCommand <RefreshGoodsUICommand>(); ApplicationFacade.applicationInstance.RegisterCommand <BuyCommand>(); }
public override void Execute(INotification notification) { base.Execute(notification); ShopProxy shopProxy = ApplicationFacade.applicationInstance.RetrieveProxy <ShopProxy>(); ShopPanelMediator shopPanelMediator = ApplicationFacade.applicationInstance.RetrieveMediator <ShopPanelMediator>(); foreach (var goodsData in shopProxy.goodsList) { shopPanelMediator.AddGoods(goodsData); } }