Initial HUD implementation and timer + game over

This commit is contained in:
2025-04-16 12:54:22 +05:30
parent c292da805d
commit f732cdef59
8 changed files with 298 additions and 8 deletions

View File

@@ -37,6 +37,18 @@ public:
UFUNCTION(BlueprintCallable, Category = "Combat")
float GetShieldPercentage() const { return CurrentShield / MaxShield; }
UFUNCTION(BlueprintCallable, Category = "Stats")
float GetCurrentHealth() const { return CurrentHealth; }
UFUNCTION(BlueprintCallable, Category = "Stats")
float GetMaxHealth() const { return MaxHealth; }
UFUNCTION(BlueprintCallable, Category = "Stats")
float GetCurrentShield() const { return CurrentShield; }
UFUNCTION(BlueprintCallable, Category = "Stats")
float GetMaxShield() const { return MaxShield; }
protected:
virtual void BeginPlay() override;
@@ -128,17 +140,17 @@ protected:
void HandleMouseLook(const FInputActionValue& Value);
// Health properties
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat")
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat|Stats")
float MaxHealth = 100.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat")
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat|Stats")
float CurrentHealth = 100.0f;
// Shield properties
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat")
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat|Stats")
float MaxShield = 100.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat")
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat|Stats")
float CurrentShield = 100.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Combat")