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.
20 lines
504 B
C#
20 lines
504 B
C#
3 months ago
|
using D2D.Common;
|
||
|
using D2D.Databases;
|
||
|
using D2D.Utilities;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace D2D.UI
|
||
|
{
|
||
|
public class MoneyLabel : TrackableValueUI<float>
|
||
|
{
|
||
|
[SerializeField] private bool _useDollarPostfix = true;
|
||
|
|
||
|
public override TrackableValue<float> FindTrackable() =>
|
||
|
this.FindLazy<GameProgressionDatabase>().Money;
|
||
|
|
||
|
protected override string ValueToText(float value)
|
||
|
{
|
||
|
return value.Round() + (_useDollarPostfix ? "$" : "");
|
||
|
}
|
||
|
}
|
||
|
}
|