Cow_Life_Sim_RPG/Utils/XpDisplayUtils.gd

13 lines
278 B
GDScript

extends RefCounted
class_name XpDisplayUtils
static func xpFormater(xpAmount:int, dropFirstDigit:bool = false):
var firstDigit = xpAmount % 10
var otherDigits = xpAmount / 10
if dropFirstDigit:
return str(otherDigits)
return str(otherDigits) + "." + str(firstDigit)