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 FText UCharacterStatsComponent::GetHealthText() const
{ {
return FText::Format(FText::FromString(TEXT("{0:.0f} / {1:.0f}")), return FText::Format(FText::FromString(TEXT("{0} / {1}")),
FText::AsNumber(CurrentHealth), FText::AsNumber(FMath::RoundToInt(CurrentHealth)),
FText::AsNumber(MaxHealth)); FText::AsNumber(FMath::RoundToInt(MaxHealth)));
} }
FText UCharacterStatsComponent::GetDamageText() const FText UCharacterStatsComponent::GetDamageText() const
{ {
return FText::Format(FText::FromString(TEXT("Damage: {0:.0f}")), return FText::Format(FText::FromString(TEXT("{0}")),
FText::AsNumber(CurrentDamage)); FText::AsNumber(FMath::RoundToInt(CurrentDamage)));
} }
FText UCharacterStatsComponent::GetSpeedText() const FText UCharacterStatsComponent::GetSpeedText() const
{ {
return FText::Format(FText::FromString(TEXT("Speed: {0:.0f}")), return FText::Format(FText::FromString(TEXT("{0}")),
FText::AsNumber(CurrentSpeed)); FText::AsNumber(FMath::RoundToInt(CurrentSpeed)));
} }
void UCharacterStatsComponent::ApplySpeedToMovement() void UCharacterStatsComponent::ApplySpeedToMovement()