Exemplo n.º 1
0
    private void RefreshPowerNumber(int type, List <int> attrIds, List <int> attrValues, bool isSwitch)
    {
        int           num           = (int)EquipGlobal.CalculateFightingByIDAndValue(attrIds, attrValues);
        ChangeNumAnim changeNumAnim = this.mTxPower.GetComponent <ChangeNumAnim>();

        if (isSwitch)
        {
            if (changeNumAnim != null)
            {
                changeNumAnim.set_enabled(false);
            }
            this.mTxPower.set_text(string.Format("战力:<color=#FFEB4B>{0}</color>", num));
        }
        else
        {
            if (changeNumAnim == null)
            {
                changeNumAnim = this.mTxPower.get_gameObject().AddComponent <ChangeNumAnim>();
            }
            else
            {
                changeNumAnim.set_enabled(true);
            }
            changeNumAnim.ShowChangeNumAnim(ChangeNumAnim.AnimType.Normal, this.mTxPower, (long)this.LastPower, (long)num, null, delegate(string resultStr)
            {
                this.mTxPower.set_text(string.Format("战力:<color=#FFEB4B>{0}</color>", resultStr));
            }, null);
        }
        this.LastPower = num;
    }
Exemplo n.º 2
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);
            });
        }
    }
Exemplo n.º 3
0
    private void anim_RewardNums()
    {
        ChangeNumAnim changeNumAnim = this.m_lblExpNum.get_gameObject().AddMissingComponent <ChangeNumAnim>();

        changeNumAnim.ShowChangeNumAnim(ChangeNumAnim.AnimType.Normal, this.m_lblExpNum, 0L, BattlePassUIViewModel.Instance.ObtainExps, null, null, null);
        changeNumAnim = this.m_lblGoldNum.get_gameObject().AddMissingComponent <ChangeNumAnim>();
        changeNumAnim.ShowChangeNumAnim(ChangeNumAnim.AnimType.Normal, this.m_lblGoldNum, 0L, BattlePassUIViewModel.Instance.ObtainCoins, null, null, null);
    }
Exemplo n.º 4
0
    private void anim_RewardNums()
    {
        Debug.LogError(MultiBattlePassUIViewModel.Instance.ObtainCoins + "=====" + MultiBattlePassUIViewModel.Instance.ObtainExps);
        base.FindTransform("Exp").get_gameObject().SetActive(MultiBattlePassUIViewModel.Instance.ObtainExps != 0L);
        base.FindTransform("Gold").get_gameObject().SetActive(MultiBattlePassUIViewModel.Instance.ObtainCoins != 0L);
        ChangeNumAnim changeNumAnim = this.m_lblExpNum.get_gameObject().AddMissingComponent <ChangeNumAnim>();

        changeNumAnim.ShowChangeNumAnim(ChangeNumAnim.AnimType.Normal, this.m_lblExpNum, 0L, MultiBattlePassUIViewModel.Instance.ObtainExps, null, null, null);
        changeNumAnim = this.m_lblGoldNum.get_gameObject().AddMissingComponent <ChangeNumAnim>();
        changeNumAnim.ShowChangeNumAnim(ChangeNumAnim.AnimType.Normal, this.m_lblGoldNum, 0L, MultiBattlePassUIViewModel.Instance.ObtainCoins, null, null, null);
    }
Exemplo n.º 5
0
 public void ShowFighting(long fightingNow, bool anim, long fightingOld)
 {
     if (anim)
     {
         this.fx_fighting_id = FXSpineManager.Instance.PlaySpine(303, base.FindTransform("RootFighting"), "PetBasicUI", 2001, null, "UI", 100f, -20f, 1f, 1f, false, FXMaskLayer.MaskState.None);
         ChangeNumAnim changeNumAnim = this.m_lblBattlePower.get_gameObject().AddMissingComponent <ChangeNumAnim>();
         changeNumAnim.ShowChangeNumAnim(ChangeNumAnim.AnimType.Normal, this.m_lblBattlePower, fightingOld, fightingNow, null, delegate(string resultStr)
         {
             this.m_lblBattlePower.set_text(PetBasicUIViewModel.Instance.GetFighting(resultStr));
         }, delegate
         {
             FXSpineManager.Instance.DeleteSpine(this.fx_fighting_id, true);
         });
     }
     else if (fightingNow > 0L)
     {
         this.m_lblBattlePower.set_text(PetBasicUIViewModel.Instance.GetFighting(fightingNow.ToString()));
     }
     else
     {
         this.m_lblBattlePower.set_text("战力: 激活可见");
     }
 }