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)); } }
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)); } }
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)); } }
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); }
private void Gold_OnValueChanged(float oldVal, float newVal, DSPlayerScore.Score sender) { converter.SetMaxValues(0, newVal); }