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(); } }
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(); }
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(); }