LEAP Documentation 40220
Documentation for the LEAP project
ProjectXGameStateKingofTheHill.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "ProjectXGameStateKingofTheHill.generated.h"
8
9class ACapturePoint;
11
12UENUM(BlueprintType)
13enum class EKingOfTheHillPhase : uint8
14{
15 WarmUp = 0,
16 Active = 1,
17 NONE = 255,
18};
19
20USTRUCT(BlueprintType)
22{
23 GENERATED_USTRUCT_BODY()
24public:
25 UPROPERTY(BlueprintReadOnly)
27 UPROPERTY(BlueprintReadOnly)
28 float PhaseDuration = 0.0f;
29 UPROPERTY(BlueprintReadOnly)
30 float PhaseStartTime = 0.0f;
31 UPROPERTY(BlueprintReadWrite)
32 TArray<ACapturePoint*> ActiveBases;
33};
34
35DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FKingOfTheHillPhaseEventSignature, const FKingOfTheHillPhaseInfo&, PhaseInfo);
36DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FKingofTheHillEvent, AProjectXPlayerState*, PlayerState, ACapturePoint*, Point, int32, Data);
37
38UCLASS()
40{
41 GENERATED_BODY()
42public:
44
45 UFUNCTION(BlueprintPure)
46 const FKingOfTheHillPhaseInfo& GetPhaseInfo() const { return PhaseInfo; }
47
48 void UpdatePhaseDurations(float NewWarmupDuration, float NewActivePhaseDuration) { WarmUpPhaseDuration = NewWarmupDuration; ActivePhaseDuration = NewActivePhaseDuration; }
49 void UpdateNewWarmingUpBases(float StartTime,const TArray<ACapturePoint*>& NewCapturePoints);
50 void UpdatePhaseActive(float StartTime);
51 void ToggleActiveBasesLocked(bool bLockedState);
52
53 virtual void HandleMatchWarmupEnded() override;
54
55 UPROPERTY(BlueprintAssignable)
56 FKingOfTheHillPhaseEventSignature OnPhaseUpdatedEvent;
57
58 UPROPERTY(BlueprintAssignable)
59 FKingofTheHillEvent OnKingofTheHillEvent;
60
61protected:
62 UFUNCTION()
63 virtual void OnRep_KingOfTHeHillPhaseInfo();
64
65 UPROPERTY(ReplicatedUsing = OnRep_KingOfTHeHillPhaseInfo)
67
68 float WarmUpPhaseDuration;
69 float ActivePhaseDuration;
70
71 FString MatchStartKOTH = "VO_MatchStart_KOTH";
72 FString MatchStart = "VO_MatchStart";
73};
EKingOfTheHillPhase
Definition: ProjectXGameStateKingofTheHill.h:14
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FKingOfTheHillPhaseEventSignature, const FKingOfTheHillPhaseInfo &, PhaseInfo)
DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FKingofTheHillEvent, AProjectXPlayerState *, PlayerState, ACapturePoint *, Point, int32, Data)
Definition: CapturePoint.h:77
Definition: ProjectXGameModeBaseControl.h:14
virtual void HandleMatchWarmupEnded()
Definition: ProjectXGameMode.cpp:371
Definition: ProjectXGameStateBaseControl.h:16
Definition: ProjectXGameStateKingofTheHill.h:40
void UpdatePhaseDurations(float NewWarmupDuration, float NewActivePhaseDuration)
Definition: ProjectXGameStateKingofTheHill.h:48
Definition: ProjectXPlayerState.h:238
Definition: ProjectXGameStateKingofTheHill.h:22