You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/3rd/D2D_Scripts/UI/LevelRewardLabel.cs

22 lines
578 B
C#

using D2D.Common;
using D2D.Gameplay;
using D2D.UI;
using D2D.Utilities;
using UnityEngine;
namespace D2D.UI
{
public class LevelRewardLabel : TrackableValueUI<float>
{
[SerializeField] private string _preText;
public override TrackableValue<float> FindTrackable() =>
new TrackableValue<float>(FindObjectOfType<Level>().Reward);
protected override string ValueToText(float value) =>
_preText + value.Round();
protected override string FloatToText(float value) =>
_preText + value.Round();
}
}