Exemplo n.º 1
0
    public override void Execute(object data)
    {
        BuySkinClothFootballArgs e = data as BuySkinClothFootballArgs;
        GameModel gm   = Game.M_Instance.M_GM;
        UIShop    shop = MVC.GetView <UIShop>();

        if (gm.GetMoney(e.M_Coin))
        {
            gm.M_BuySkin.Add(e.M_ID);
            //shop.UpdateUI();
        }
    }
Exemplo n.º 2
0
    public void OnBuyFootballClick()
    {
        Game.M_Instance.M_Sound.PlayEffect(Consts.S_Se_UI_Button);
        state = m_gm.CheckFootballState(m_selectIndex);
        switch (state)
        {
        case ItemState.UnBuy:
            int money = Game.M_Instance.M_StaticData.GetFootballInfo(m_selectIndex).M_Coin;
            BuySkinClothFootballArgs e = new BuySkinClothFootballArgs()
            {
                M_Coin = money,
                M_ID   = m_selectIndex
            };
            MVC.SendEvent(Consts.E_BuyFootballController, e);
            break;

        case ItemState.Buy:
            MVC.SendEvent(Consts.E_EquipFootballController, m_selectIndex);
            break;
        }
        UpdateFootballBuyButton(m_selectIndex);
        UpdateFootballGizmo();
    }
Exemplo n.º 3
0
    public void OnBuyClothClick()
    {
        Game.M_Instance.M_Sound.PlayEffect(Consts.S_Se_UI_Button);
        state = m_gm.CheckClothState(m_selectIndex);
        switch (state)
        {
        case ItemState.UnBuy:
            int money01 = Game.M_Instance.M_StaticData.GetClothInfo(m_gm.M_TakeOnSkin, m_selectIndex).M_Coin;
            BuySkinClothFootballArgs e = new BuySkinClothFootballArgs()
            {
                M_Coin = money01,
                M_ID   = m_selectIndex
            };
            MVC.SendEvent(Consts.E_BuyClothController, e);
            break;

        case ItemState.Buy:
            MVC.SendEvent(Consts.E_EquipClothController, m_selectIndex);
            break;
        }
        UpdateBuyClothButton(m_selectIndex);
        UpdateClothGizmo();
    }