Ejemplo n.º 1
0
    //鞋子【购买】或者【装备】点击
    public void OnShoseBuyBtnClick()
    {
        switch (gm.ShoseInfoList[selectIndex].State)
        {
        case ItemState.UnBuy:
            Game.Instance.Sound.PlayEffect("Se_UI_Button");
            ShopArgs e = new ShopArgs
            {
                index = selectIndex,
                coin  = Game.Instance.Data.GetShoseData(selectIndex).coin,
                state = ItemState.Buy
            };
            SendEvent(Consts.E_ShoseBuy, e);
            break;

        case ItemState.Buy:
            Game.Instance.Sound.PlayEffect("Se_UI_Button");
            ShopArgs ee = new ShopArgs
            {
                index = selectIndex,
                coin  = 0,
                state = ItemState.Equiep
            };
            SendEvent(Consts.E_ShoseEquipe, ee);
            break;

        case ItemState.Equiep:
            break;
        }
    }
Ejemplo n.º 2
0
    //点击AR足球按钮
    public void FootBallGetBtnClick()
    {
        switch (gm.FootballInfoList[2].State)
        {
        case ItemState.UnBuy:
            Game.Instance.Sound.PlayEffect("Se_UI_Button");
            ShopArgs e = new ShopArgs
            {
                index = 2,
                coin  = -Game.Instance.Data.GetFootballData(2).coin,
                state = ItemState.Buy
            };
            SendEvent(Consts.E_AR_FootBallGet, e); //发送事件
            StartCoroutine(JinBiMuiscCor());       //金币声
            break;

        case ItemState.Buy:
            Game.Instance.Sound.PlayEffect("Se_UI_Dress");
            ShopArgs ee = new ShopArgs
            {
                index = 2,
                coin  = 0,
                state = ItemState.Equiep
            };
            SendEvent(Consts.E_AR_FootBallEquipe, ee);    //发送事件
            break;

        case ItemState.Equiep:
            Game.Instance.Sound.PlayEffect("Se_UI_Zhuang");
            TipMessage("此奖励<color=red>已获取</color>,并<color=red>已装备</color>" + "\n\n"
                       + "<color=red>请继续识别其他目标</color>获取奖励<color=red>!</color>");
            break;
        }
    }
Ejemplo n.º 3
0
    //足球【购买】或者【装备】点击
    public void OnFootBallBuyBtnClick()
    {
        switch (gm.FootballInfoList[selectIndex].State)
        {
        case ItemState.UnBuy:
            Game.Instance.Sound.PlayEffect("Se_UI_Button");
            ShopArgs e = new ShopArgs
            {
                index = selectIndex,
                coin  = Game.Instance.Data.GetFootballData(selectIndex).coin,
                state = ItemState.Buy
            };
            SendEvent(Consts.E_BuyFootBall, e);
            break;

        case ItemState.Buy:
            Game.Instance.Sound.PlayEffect("Se_UI_Dress");
            ShopArgs ee = new ShopArgs
            {
                index = selectIndex,
                coin  = 0,
                state = ItemState.Equiep
            };
            SendEvent(Consts.E_EquipeFootBall, ee);
            break;

        case ItemState.Equiep:
            break;
        }
    }
Ejemplo n.º 4
0
    public override void Execute(object data = null)
    {
        ShopArgs  e       = data as ShopArgs;
        ARImageUI imageUI = GetView <ARImageUI>();
        GameModel gm      = GetModel <GameModel>();

        if (gm.GetMoney(e.coin))
        {
            gm.ShoseInfoList[e.index].State = e.state;
            imageUI.TipMessage("获得<color=b>红色球鞋</color>,金币 <color=b>+400</color>!" + "\n\n"
                               + "<color=red>再次点击文字</color><color=b>装备球鞋</color>!");
            imageUI.UpdateUI();
        }
    }
Ejemplo n.º 5
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();
    }
Ejemplo n.º 6
0
    public override void Execute(object data = null)
    {
        ShopArgs  e       = data as ShopArgs;
        GameModel gm      = GetModel <GameModel>();
        ARImageUI imageUI = GetView <ARImageUI>();

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

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


        imageUI.TipMessage("此目标已经获取!" + "\n\n" + "此次点击图标<color=red>装备</color><color=b>足球</color>,请返回商城查看!");
        imageUI.UpdateUI();
    }
Ejemplo n.º 7
0
    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();
    }
Ejemplo n.º 8
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("金币不足!");
        }
    }