5#include "CoreMinimal.h"
6#include "GameFramework/Actor.h"
10#include "AssaultPointDestructible.generated.h"
12class UPrimitiveComponent;
13class UInteractableComponent;
15class UAfflictionInstance;
21 GENERATED_USTRUCT_BODY()
23 UPROPERTY(BlueprintReadOnly)
24 bool bBombActive = false;
25 UPROPERTY(BlueprintReadOnly)
26 float BombPlaceTime = 0.0f;
27 UPROPERTY(BlueprintReadOnly)
42 UFUNCTION(BlueprintPure)
43 bool IsDestroyed()
const;
44 virtual int32
GetTeam()
const override {
return TeamOwner; }
45 UFUNCTION(BlueprintPure)
46 const
FBombInfo& GetBombInfo()
const {
return BombInfo; }
47 UFUNCTION(BlueprintPure)
48 FORCEINLINE
bool IsBombPlanted()
const {
return BombInfo.
bBombActive; }
49 UFUNCTION(BlueprintPure)
50 FORCEINLINE
float GetFuseTime()
const {
return BombFuseTime; }
51 UFUNCTION(BlueprintPure)
52 FORCEINLINE
bool IsActivePoint()
const {
return bActive; }
53 virtual void DestroyPoint();
54 virtual int32
SetTeam(int32 NewTeam)
override;
56 UPROPERTY(BlueprintAssignable)
57 FAssaultPointDestructibleSignature OnDestructibleDestroyedEvent;
58 UPROPERTY(BlueprintAssignable)
59 FAssaultPointDestructibleHealthSignature OnDamageTaken;
60 UPROPERTY(BlueprintAssignable)
61 FBombUpdatedSignature OnBombStateUpdated;
63 void ToggleActive(
bool bNewActiveState);
65 virtual FText GetHighlightText(const UPrimitiveComponent* Component, const APlayerController* EventSender) const override;
66 virtual
bool CanBeInteractedWith(const UPrimitiveComponent* Component, const APlayerController* EventSender) const override;
69 UFUNCTION(NetMulticast,UnReliable)
70 void Multicast_DestroyPoint();
73 void OnSelected(APlayerController* Sender, UPrimitiveComponent* Component);
75 void OnHoldStopped(APlayerController* Sender, UPrimitiveComponent* Component);
77 void OnHoldStarted(APlayerController* Sender, UPrimitiveComponent* Component);
79 void OnValidInteractionTargetUpdated(APlayerController* Sender,
bool bValidInteraction);
85 void OnRep_Destroyed();
88 UFUNCTION(BlueprintImplementableEvent)
89 void OnDestructibleDestroyed();
90 UFUNCTION(BlueprintImplementableEvent)
91 void OnTeamUpdated(int32 NewTeam);
93 void OnRep_BombInfo();
95 UPROPERTY(EditDefaultsOnly, Category = Interactable)
96 TSubclassOf<UAfflictionInstance> InteractionAffliction;
98 UPROPERTY(EditDefaultsOnly, Category = Interactable)
99 FText BombPlantText = FText();
101 UPROPERTY(EditDefaultsOnly, Category = Interactable)
102 FText BombDisarmText = FText();
106 UPROPERTY(ReplicatedUsing = OnRep_Destroyed)
107 bool bDestroyed = false;
108 UPROPERTY(Replicated)
109 bool bActive = false;
110 UPROPERTY(EditDefaultsOnly, Category = Bomb)
111 float BombFuseTime = 10.0f;
112 UPROPERTY(ReplicatedUsing = OnRep_BombInfo)
115 FTimerHandle BombFuseTimer;
117 UPROPERTY(EditDefaultsOnly)
118 UInteractableComponent* InteractableComponent;
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FAssaultPointDestructibleHealthSignature, float, Health, float, MaxHealth)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FAssaultPointDestructibleSignature, AAssaultPointDestructible *, Point)
Definition: AssaultPointDestructible.h:37
virtual int32 GetTeam() const override
Definition: AssaultPointDestructible.h:44
Definition: ProjectXCharacter.h:128
Definition: ProjectXPlayerState.h:238
virtual void OnRep_Team()
Definition: ProjectXPlayerState.cpp:1789
int32 SetTeam(int32 NewTeam) override
Definition: ProjectXPlayerState.cpp:1592
Definition: InteractableInterface.h:18
Definition: TeamInterface.h:26
Definition: AssaultPointDestructible.h:20
bool bBombActive
Definition: AssaultPointDestructible.h:24