Exemplo n.º 1
0
    IEnumerator FlopAnim(FlopItem flopItem)
    {
        yield return(new WaitForSeconds(0.1f));

        PressEffect.SetActive(true);
        BattleUtil.PlayParticleSystems(PressEffect);
        yield return(new WaitForSeconds(1f));

        Anim1.enabled = true;
        SpLight.gameObject.SetActive(true);
        if (GameLibrary.Instance().ItemStateList.ContainsKey(flopItem.itemId))
        {
            ItemNodeState item = GameLibrary.Instance().ItemStateList[flopItem.itemId];

            Num.text        = flopItem.num.ToString();
            Name.text       = item.name;
            Icon.spriteName = item.icon_name;
            if (item.types == 6)
            {
                Icon.atlas       = ResourceManager.Instance().GetUIAtlas("UIHeroHead");
                SpTypeIcon.alpha = 1;
            }
            else
            {
                Icon.atlas       = ResourceManager.Instance().GetUIAtlas("Prop");
                SpTypeIcon.alpha = 0;
            }
            Frame.spriteName = ItemData.GetFrameByGradeType((GradeType)item.grade);
        }
    }
Exemplo n.º 2
0
    public void Show(Dictionary <string, object> dict, string coinNum)
    {
        foreach (string k in dict.Keys)
        {
            Dictionary <string, object> itemData = (Dictionary <string, object>)dict[k];
            FlopItem flopItem = new FlopItem();
            flopItem.index  = int.Parse(k);
            flopItem.itemId = int.Parse(itemData["id"].ToString());
            flopItem.cost   = int.Parse(itemData["cs"].ToString());
            flopItem.num    = int.Parse(itemData["at"].ToString());
            flopItems.Add(flopItem);
        }
        flopItems.Sort((a, b) => { return(a.index - b.index); });

        gameObject.SetActive(true);
        LaCoin.text           = coinNum;
        BtnFlopAll.onClick    = FlopAll;
        BtnOK.onClick         = backScene;
        BtnFightAgain.onClick = backScene;
        TitleEffect.gameObject.SetActive(true);

        AllPrice.text    = "" + GetAllCost();
        playerDiamond    = playerData.GetInstance().baginfo.diamond;
        LaMyDiamond.text = "" + playerDiamond;
    }
Exemplo n.º 3
0
 public void DoFlop(FlopItem flopItem)
 {
     Time.timeScale = 1;
     PriceIcon.gameObject.SetActive(false);
     Price.gameObject.SetActive(false);
     AudioController.Instance.PlayUISound("UI_FanPai");
     StartCoroutine(FlopAnim(flopItem));
 }