LEAP Documentation 40220
Documentation for the LEAP project
ProjectXGameModeBaseControl.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 "ProjectX.h"
6#include "CoreMinimal.h"
7#include "ProjectXGameMode.h"
8#include "ProjectXGameModeBaseControl.generated.h"
9
10class ULocalMessage;
11
12UCLASS()
14{
15 GENERATED_UCLASS_BODY()
16
17public:
18 virtual void InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage) override;
19 virtual void InitGameState() override;
20 int32 GetBaseTicketLossInterval() const { return BaseTicketLossInterval; }
21 UFUNCTION(BlueprintCallable)
22 int32 GetTicketsLostPerBase() const { return TicketsLostPerBase; }
23 int32 GetNumberOfCheckPoints() const {return NumberOfCapturePointCheckpoints;}
24 float GetPlayerCaptureRate() const { return PerPlayerCaptureRate; }
25 virtual void OnDeath(AController* Killed, AController* Killer, TSubclassOf<class UProjectXDamageType> DamageType, bool bWasHeadshot) override;
26 TSubclassOf<ULocalMessage> GetCapturePointBroadcastMessage() const { return CapturePointBroadcastMessage; }
27
28 UFUNCTION()
29 virtual void OnCapturePointOwnerChanged(int32 NewOwner, ACapturePoint* Point);
30 UFUNCTION()
31 virtual void OnCapturePointAttacked(int32 TeamTakingPoint, ACapturePoint* Point);
32
33protected:
34 virtual void CalculateControlPointWinCondition();
35 virtual void CollectGamePlayObjects() override;
36 UFUNCTION()
37 virtual void TicketConsumeTimer();
38
39private:
40 /* The rate at which ticket losses occur */
41 UPROPERTY(EditDefaultsOnly, Category = GameMode, meta = (AllowPrivateAccess = true))
42 float BaseTicketLossInterval = 5.f;
43 UPROPERTY(GlobalConfig)
44 float BaseTicketLossIntervalOverride = INDEX_NONE;
45
46 /* The number of subpoints in the capture points where players received XP */
47 UPROPERTY(EditDefaultsOnly, Category = GameMode, meta = (AllowPrivateAccess = true , ClampMin = 0))
48 uint8 NumberOfCapturePointCheckpoints;
49
50 /*The rate per player that bases are captured*/
51 UPROPERTY(EditDefaultsOnly, Category = "Capture Point", meta = (AllowPrivateAccess = true))
52 float PerPlayerCaptureRate = 0.1f;
53
54 /* The quantity of tickets lost for each base an opponent has captured */
55 UPROPERTY(EditDefaultsOnly, Category = GameMode, meta = (AllowPrivateAccess = true))
56 int32 TicketsLostPerBase = 1;
57 UPROPERTY(GlobalConfig)
58 int32 TicketsLostPerBaseOverride = INDEX_NONE;
59
60 UPROPERTY(EditDefaultsOnly, Category = GameMode, meta = (AllowPrivateAccess = true))
61 TSubclassOf<ULocalMessage> CapturePointBroadcastMessage = NULL;
62
63 UPROPERTY()
64 class AProjectXGameStateBaseControl* BaseControlGameState = NULL;
65
66 UPROPERTY()
67 FTimerHandle TicketConsumeTimerHandle;
68};
Definition: CapturePoint.h:77
Definition: ProjectXGameModeBaseControl.h:14
TSubclassOf< ULocalMessage > GetCapturePointBroadcastMessage() const
Definition: ProjectXGameModeBaseControl.h:26
int32 GetNumberOfCheckPoints() const
Definition: ProjectXGameModeBaseControl.h:23
int32 GetBaseTicketLossInterval() const
Definition: ProjectXGameModeBaseControl.h:20
float GetPlayerCaptureRate() const
Definition: ProjectXGameModeBaseControl.h:24
Definition: ProjectXGameMode.h:115
Definition: ProjectXGameStateBaseControl.h:16