Beispiel #1
0
    public override void Execute(object data)
    {
        UIShop    shop = MVC.GetView <UIShop>();
        int       id   = (int)data;
        GameModel gm   = Game.M_Instance.M_GM;

        gm.M_TakeOnSkin = id;
        shop.UpdateUI();
    }
Beispiel #2
0
    public override void Execute(object data)
    {
        GameModel       gm   = GetModel <GameModel>();
        UIShop          shop = GetView <UIShop>();
        BuyFootballArgs e    = data as BuyFootballArgs;

        gm.TakeonFootball = e.Index;
        shop.UpdateUI();
        shop.UpdateFootballBuyBtn(e.Index);
        //更新Gizmo
        shop.UpdateFootBallGizmo();
    }
Beispiel #3
0
    public override void Execute(object data)
    {
        GameModel   gm   = GetModel <GameModel>();
        UIShop      shop = GetView <UIShop>();
        BuySkinArgs e    = data as BuySkinArgs;

        gm.TakeonSkin = e.ID;
        //更新UI
        shop.UpdateUI();
        shop.UpdateSkinBuyBtn(e.ID.SkinID);
        //更新Gizmo
        shop.UpdateSkinGizmo();
    }
Beispiel #4
0
    public override void Execute(object data = null)
    {
        ShopArgs  e    = data as ShopArgs;
        GameModel gm   = GetModel <GameModel>();
        UIShop    shop = GetView <UIShop>();


        gm.HeadInfoList[gm.EquipeHeadIndex].State = ItemState.Buy;


        gm.HeadInfoList[e.index].State = e.state;
        gm.SkillTime = Game.Instance.Data.GetHeadData(e.index).skillAdd;

        shop.UpdateUI();
    }
    public override void Execute(object data = null)
    {
        ShopArgs  e    = data as ShopArgs;
        GameModel gm   = GetModel <GameModel>();
        UIShop    shop = GetView <UIShop>();


        gm.FootballInfoList[gm.EquipeBallIndex].State = ItemState.Buy; //把之前装备的更改为已购买


        gm.FootballInfoList[e.index].State = e.state;
        gm.ShotQulity = Game.Instance.Data.GetFootballData(e.index).skillAdd;

        shop.UpdateUI();
    }
Beispiel #6
0
    public override void Execute(object data = null)
    {
        ShopArgs  e    = data as ShopArgs;
        UIShop    shop = GetView <UIShop>();
        GameModel gm   = GetModel <GameModel>();

        if (gm.GetMoney(e.coin))
        {
            gm.FootballInfoList[e.index].State = e.state;
            shop.UpdateUI();
        }
        else
        {
            shop.TipMessage("金币不足!");
        }
    }
    public override void Execute(object data)
    {
        GameModel       gm   = GetModel <GameModel>();
        UIShop          shop = GetView <UIShop>();
        BuyFootballArgs e    = data as BuyFootballArgs;

        if (gm.PayCoin(e.Coin))
        {
            //把当前id加入已购买列表
            gm.BuyFootball.Add(e.Index);
            foreach (var item in gm.BuyFootball)
            {
                Debug.Log("买了" + item + "号");
            }
            //更新UI
            shop.UpdateUI();
            shop.UpdateFootballBuyBtn(e.Index);
            //更新GIzmo
            shop.UpdateFootBallGizmo();
        }
    }
Beispiel #8
0
    public override void Execute(object data)
    {
        GameModel   gm   = GetModel <GameModel>();
        UIShop      shop = GetView <UIShop>();
        BuySkinArgs e    = data as BuySkinArgs;

        if (gm.PayCoin(e.Coin))
        {
            //把当前id加入已购买列表
            gm.BuySkin.Add(e.ID);
            foreach (var item in gm.BuySkin)
            {
                Debug.Log("买了" + item.SkinID + "号皮肤" + item.ClothID + "号衣服");
            }
            //更新UI
            shop.UpdateUI();
            shop.UpdateClothBuyBtn(e.ID.ClothID);

            //更新GIzmo
            shop.UpdateClothGizmo();
        }
    }