Ejemplo n.º 1
0
 public void OnBuyDiamondClick()
 {
     ShopPanel.Load();
     if (ShopPanel.Instance != null)
     {
         ShopPanel.Instance.RefreshToState(ShopPanel.ShopState.Recharge);
     }
 }
Ejemplo n.º 2
0
 public void OnBuyCoinClick()
 {
     ShopPanel.Load();
     if (ShopPanel.Instance != null)
     {
         ShopPanel.Instance.RefreshToState(ShopPanel.ShopState.ExchangeMoney10);
     }
 }
Ejemplo n.º 3
0
    private void OnClick()
    {
        switch (ButtonType)
        {
        case ButtonTypeEnum.BuyHeart:

            UMengPlugin.UMengEvent(EventId.GOTO_HEART,
                                   new Dictionary <string, object>
            {
                { "from", MainRoot.Instance.CurrentViewStateName },
                { "heart", CommonData.HeartData.Count }
            });

            ShopPanel.Load();
            if (ShopPanel.Instance != null)
            {
                ShopPanel.Instance.RefreshToState(ShopPanel.ShopState.ExchangeHeart);
            }
            break;

        case ButtonTypeEnum.BuyCoin:

            UMengPlugin.UMengEvent(EventId.GOTO_COIN,
                                   new Dictionary <string, object>
            {
                { "from", MainRoot.Instance.CurrentViewStateName },
                { "coin", CommonData.MyUser.Money10 }
            });

            ShopPanel.Load();
            if (ShopPanel.Instance != null)
            {
                ShopPanel.Instance.RefreshToState(ShopPanel.ShopState.ExchangeMoney10);
            }
            break;

        case ButtonTypeEnum.BuyDiamond:

            UMengPlugin.UMengEvent(EventId.GOTO_DIAMOND,
                                   new Dictionary <string, object>
            {
                { "from", MainRoot.Instance.CurrentViewStateName },
                { "diamond", CommonData.MyUser.Money1 }
            });

            ShopPanel.Load();
            if (ShopPanel.Instance != null)
            {
                ShopPanel.Instance.RefreshToState(ShopPanel.ShopState.Recharge);
            }
            break;

        default:
            Debug.LogError("超出范围", this);
            break;
        }
    }
Ejemplo n.º 4
0
        public void OnShopClick()
        {
            UMengPlugin.UMengEvent(EventId.HOME_SHOP, null);

            ShopPanel.Load();
            if (ShopPanel.Instance != null)
            {
                ShopPanel.Instance.RefreshToState(ShopPanel.ShopState.Recharge);
            }
        }