예제 #1
0
 private ShopProxy GetShopProxy()
 {
     if (m_ShopProxy == null)
     {
         m_ShopProxy = GameFacade.Instance.RetrieveProxy(ProxyName.ShopProxy) as ShopProxy;
     }
     return(m_ShopProxy);
 }
예제 #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);
        }
    }
예제 #3
0
 public override void Initialize()
 {
     m_MinNum           = FindComponent <TMP_Text>("Content/Label_Min");
     m_MaxNum           = FindComponent <TMP_Text>("Content/Label_Max");
     m_Tips             = FindComponent <TMP_Text>("Content/Label_Tips");
     m_GoodName         = FindComponent <TMP_Text>("Content/Label_Item_Name");
     m_InputBox         = FindComponent <TMP_InputField>("Content/Input");
     m_TotalPrice       = FindComponent <TMP_Text>("Content/Money/Coin1/Label_Coin");
     m_MoneyRoot        = FindComponent <Transform>("Content/Money");
     m_MoneyIcon        = FindComponent <Image>("Content/Money/Coin1/Image_Icon");
     m_BtnLeft          = FindComponent <Transform>("Content/Btn_Left");
     m_BtnRight         = FindComponent <Transform>("Content/Btn_Right");
     m_HotKeyRoot       = FindComponent <Transform>("Control/Footer/ContentHotKey");
     m_PackageProxy     = GameFacade.Instance.RetrieveProxy(ProxyName.PackageProxy) as PackageProxy;
     m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
     m_ShopProxy        = GameFacade.Instance.RetrieveProxy(ProxyName.ShopProxy) as ShopProxy;
     m_ShipProxy        = GameFacade.Instance.RetrieveProxy(ProxyName.ShipProxy) as ShipProxy;
 }
예제 #4
0
    public override void OnShow(object msg)
    {
        base.OnShow(msg);
        m_ShopId = (int)msg;
        if (m_ShopProxy == null)
        {
            m_ShopProxy = GameFacade.Instance.RetrieveProxy(ProxyName.ShopProxy) as ShopProxy;
        }
        if (m_PackageProxy == null)
        {
            m_PackageProxy = GameFacade.Instance.RetrieveProxy(ProxyName.PackageProxy) as PackageProxy;
        }

        State.GetAction(UIAction.Shop_Buy).Callback -= OnHotKeyCallBack;
        State.GetAction(UIAction.Shop_Buy).Callback += OnHotKeyCallBack;

        State.GetAction(UIAction.Shop_Sell).Callback -= OnHotKeyCallBack;
        State.GetAction(UIAction.Shop_Sell).Callback += OnHotKeyCallBack;

        NetworkManager.Instance.GetShopController().RequestShopWindowInfo((uint)m_ShopId);
        NetworkManager.Instance.GetShopController().RequestShopSellBackInfo((uint)m_ShopId);
        State.OnSelectionChanged += OnSelectionChanged;
    }