Space Plunder
Loading...
Searching...
No Matches
HealthWidget.h
Go to the documentation of this file.
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Blueprint/UserWidget.h"
7#include "Data/HealthData.h"
8#include "HealthWidget.generated.h"
9
10
11UCLASS(Blueprintable)
12class HEALTH_API UHealthWidget : public UUserWidget
13{
14 GENERATED_BODY()
15
16public:
17
18 explicit UHealthWidget(const FObjectInitializer& ObjectInitializer);
19
20
21 UFUNCTION(BlueprintCallable)
22 void SetHasShield(const bool in_bHasShield);
23
24 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Health")
25 void UpdateHealth(const float CurrentHealth, const float MaxHealth, const class UDamageType* DamageType);
26 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Health")
27 void UpdateHealthAndShield(const float CurrentHealth, const float MaxHealth, const float CurrentShieldHealth, const float MaxShieldHealth, const class UDamageType* DamageType = nullptr);
28 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Health")
29 void ShieldBroken();
30
31 UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category="Health")
32 void InjuredBodyPart(EBodyPartName InjuredBodyPart, FVector HitLocation,const TArray<FBodyPart>& AllBodyParts);
33
34 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Health|General")
35 FVector2D SpacerSize = FVector2D(0.0f, 4.0f);
36 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Health|General")
37 FVector2D BarSize;
38
39 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Health|General")
40 FProgressBarStyle HealthStyle;
41 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Health|General")
42 FProgressBarStyle ShieldStyle;
43 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Health|General")
44 FProgressBarStyle ShieldDamageStyle;
45 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Health|General")
46 FProgressBarStyle HealthDamageStyle;
47
48protected:
49 virtual bool Initialize() override;
50 virtual void NativePreConstruct() override;
51 virtual void NativeConstruct() override;
52
53 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Health")
54 class UProgressBar* HealthBar;
55 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Health")
56 class UProgressBar* ShieldBar;
57 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Health")
58 class UOverlay* ShieldOverlay;
59 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Health")
60 class UOverlay* HealthOverlay;
61 UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (BindWidget), Category="Health")
62 class USpacer* Spacer;
63private:
64 UPROPERTY()
65 bool bHasShield = false;
66};
67
EBodyPartName
Definition BaseData.h:133
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition Health.Build.cs:6
Definition HealthWidget.h:13
Definition HealthData.h:26