コード例 #1
0
    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>();
    }
コード例 #2
0
    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);
        }
    }