LEAP Documentation 40220
Documentation for the LEAP project
ProjectXObjectiveDefendPoints.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2022. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "ProjectXObjectiveDefendPoints.generated.h"
8
10
11UENUM(BlueprintType)
12enum class EDestructionObjectiveRole : uint8
13{
14 Attack = 0,
15 Defend = 1,
16};
17
18DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDefensePointsUpdatedSignature,const TArray<ADestroyableObjective*>&, Objectives);
19
20UCLASS()
22{
23 GENERATED_BODY()
24public:
25 UPROPERTY(BlueprintAssignable)
26 FDefensePointsUpdatedSignature OnDefensePointsUpdatedEvent;
27
28protected:
29 virtual void BeginPlay() override;
30 virtual void InitializeGamePlayObjects() override;
31 virtual void ObjectiveStarted() override;
32 virtual void ObjectiveComplete() override;
33 virtual void CollectSharedObjectivesList(TArray<TWeakObjectPtr<AActor>> SharedActors) override;
34 virtual void TogglePointsActiveState(bool bPointsActive);
35
36 UFUNCTION()
37 virtual void OnDefensePointDestroyed(AActor* Victim, const float Damage, struct FDamageEvent const& DamageEvent, const AController* EventInstigator, const AActor* DamageCauser, const APlayerState* InstigatorPlayerState);
38 UFUNCTION()
39 void OnRep_DefensePoints();
40
41 UPROPERTY(ReplicatedUsing = OnRep_DefensePoints)
42 TArray<TWeakObjectPtr<ADestroyableObjective>> ActiveDefensePoints;
43
44 /*Defense Points that are placed in the world*/
45 UPROPERTY(EditAnywhere)
46 TArray<ADestroyableObjective*> WorldSpawnedDefensePoints;
47 /*Defense Points that are placed in the world*/
48 UPROPERTY(EditAnywhere)
49 int32 NumberOfPointsToDestroy = 1;
50 /*Is the goal to attack or defend points*/
51 UPROPERTY(EditAnywhere)
53
54};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FDefensePointsUpdatedSignature, const TArray< ADestroyableObjective * > &, Objectives)
EDestructionObjectiveRole
Definition: ProjectXObjectiveDefendPoints.h:13
Definition: DestroyableObjective.h:23
virtual void BeginPlay() override
Definition: DestroyableObjective.cpp:43
Definition: ProjectXObjectiveDefendPoints.h:22
Definition: ProjectXSpawnerObjective.h:53