Esempio n. 1
0
    private void Num(Vector3 vec3)
    {
        if (this.m_BaseTweenScale == null)
        {
            this.m_BaseTweenScale = this.lblEnd.get_gameObject().AddComponent <BaseTweenScale>();
        }
        ChangeNumAnim changeNumAnim = this.lblEnd.get_gameObject().AddMissingComponent <ChangeNumAnim>();

        changeNumAnim.SetRolling(false);
        this.lblEnd.get_transform().set_localScale(Vector3.get_one());
        if (vec3.z == -1f)
        {
            this.lblEnd.set_text(string.Empty);
        }
        else if (vec3.z == 0f)
        {
            this.lblEnd.set_text(((int)vec3.y).ToString());
        }
        else
        {
            changeNumAnim.ShowChangeNumAnim(ChangeNumAnim.AnimType.Normal, this.lblEnd, (long)((int)vec3.x), (long)((int)vec3.y), delegate
            {
                this.m_BaseTweenScale.ChangeScaleTo(new Vector2(1.35f, 1.35f), 0.01f);
            }, delegate(string arg)
            {
                this.lblEnd.set_text(arg);
                SoundManager.Instance.CirculationPlayUI(10052, false);
            }, delegate
            {
                this.m_BaseTweenScale.ChangeScaleTo(Vector2.get_one(), 0.01f);
                EventDispatcher.Broadcast(EventNames.RollingNext);
            });
        }
    }
Esempio n. 2
0
    private void ShowPopup(int gold, int ext = 1)
    {
        GetGoldPopup item = this.GetUnusedPopup();

        if (item == null)
        {
            item = ResourceManager.GetInstantiate2Prefab("GetGoldPopup").GetComponent <GetGoldPopup>();
            item.get_transform().SetParent(this.mPopupPool);
            this.mList.Add(item);
        }
        item.get_transform().set_localScale(new Vector3(0.1f, 0.1f, 0.1f));
        item.get_transform().set_localPosition(Vector3.get_zero());
        if (ext > 1)
        {
            item.topTips.set_text(string.Format("女神降下了奇迹,获得<color=#F76300FF>{0}倍</color>金币!", ext));
            item.topTips.get_transform().get_parent().get_gameObject().SetActive(true);
        }
        else
        {
            item.topTips.get_transform().get_parent().get_gameObject().SetActive(false);
        }
        item.botTips.set_text("获得:      +" + gold * ext);
        item.Unused = false;
        item.get_transform().SetAsLastSibling();
        item.get_gameObject().SetActive(true);
        BaseTweenScale bts = item.GetComponent <BaseTweenScale>();

        bts.ChangeScaleTo(new Vector3(1.2f, 1.2f, 1.2f), 0.2f, delegate
        {
            bts.ChangeScaleTo(new Vector3(1f, 1f, 1f), 0.2f, delegate
            {
                item.GetComponent <BaseTweenPostion>().MoveTo(new Vector3(0f, 220f, 0f), 1f);
                item.GetComponent <BaseTweenAlphaBaseTime>().TweenAlpha(1f, 0f, 1.5f, 1f, delegate
                {
                    item.get_gameObject().SetActive(false);
                    item.Unused = true;
                });
            });
        });
    }