예제 #1
0
    void RefreshByEventSilver(float oldValue, float newValue, DSPlayerScore.Score score)
    {
        if (!gameObject.activeInHierarchy)
        {
            return;
        }

        tempSilv.val += newValue - oldValue;

        if (silvCo == null)
        {
            silvCo = StartCoroutine(PopTextCo(tempSilv, silver, score));
        }
    }
예제 #2
0
    void RefreshByEventExpirience(float oldValue, float newValue, DSPlayerScore.Score score)
    {
        if (!gameObject.activeInHierarchy)
        {
            return;
        }

        tempExp.val += newValue - oldValue;

        if (expCo == null)
        {
            expCo = StartCoroutine(PopTextCo(tempExp, expirience, score));
        }
    }
예제 #3
0
    void RefreshByEventGold(float oldValue, float newValue, DSPlayerScore.Score score)
    {
        if (!gameObject.activeInHierarchy)
        {
            return;
        }

        tempGold.val += newValue - oldValue;

        if (goldCo == null)
        {
            goldCo = StartCoroutine(PopTextCo(tempGold, gold, score));
        }
    }
예제 #4
0
    IEnumerator PopTextCo(T value, TextMeshProUGUI textUGUI, DSPlayerScore.Score score)
    {
        if (scaledDeltaTimeInPopUpTextController)
        {
            yield return(new WaitForSeconds(summTextTime));
        }
        else
        {
            yield return(new WaitForSecondsRealtime(summTextTime));
        }

        PopText(value.val, textUGUI);

        string format = StringFormats.intSeparatorNumber;

        if (textUGUI == gold)
        {
            goldCo = null;
            if (isTempValues)
            {
                format = StringFormats.intSeparatorSignNumber;
            }
        }
        else if (textUGUI == silver)
        {
            silvCo = null;
            if (isTempValues)
            {
                format = StringFormats.intSeparatorSignNumber;
            }
        }
        else if (textUGUI == expirience)
        {
            expCo = null;
            if (isTempValues)
            {
                format = StringFormats.intSeparatorSignNumber;
            }
        }

        textUGUI.text = score.Value.ToString(format, StringFormats.nfi);

        value.val = 0;

        LayoutRebuilder.ForceRebuildLayoutImmediate(rTransform);
    }
예제 #5
0
 private void Gold_OnValueChanged(float oldVal, float newVal, DSPlayerScore.Score sender)
 {
     converter.SetMaxValues(0, newVal);
 }