fix: parse errors

This commit is contained in:
2025-10-12 14:50:57 +02:00
parent 3bc3e697d2
commit 9eb329b8d3

View File

@@ -163,21 +163,21 @@ void UCharacterStatsComponent::SetHealth(float NewHealth)
FText UCharacterStatsComponent::GetHealthText() const
{
return FText::Format(FText::FromString(TEXT("{0:.0f} / {1:.0f}")),
FText::AsNumber(CurrentHealth),
FText::AsNumber(MaxHealth));
return FText::Format(FText::FromString(TEXT("{0} / {1}")),
FText::AsNumber(FMath::RoundToInt(CurrentHealth)),
FText::AsNumber(FMath::RoundToInt(MaxHealth)));
}
FText UCharacterStatsComponent::GetDamageText() const
{
return FText::Format(FText::FromString(TEXT("Damage: {0:.0f}")),
FText::AsNumber(CurrentDamage));
return FText::Format(FText::FromString(TEXT("{0}")),
FText::AsNumber(FMath::RoundToInt(CurrentDamage)));
}
FText UCharacterStatsComponent::GetSpeedText() const
{
return FText::Format(FText::FromString(TEXT("Speed: {0:.0f}")),
FText::AsNumber(CurrentSpeed));
return FText::Format(FText::FromString(TEXT("{0}")),
FText::AsNumber(FMath::RoundToInt(CurrentSpeed)));
}
void UCharacterStatsComponent::ApplySpeedToMovement()