5#include "CoreMinimal.h"
7#include "Components/ActorComponent.h"
8#include "GameFramework/GameStateBase.h"
9#include "GameStateComponentBase.generated.h"
15UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent), Abstract)
16class BASEHELPERS_API UGameStateComponentBase :
public UCommonActorComponent
21 UGameStateComponentBase();
26 T* GetGameState()
const
28 static_assert(TPointerIsConvertibleFromTo<T, AGameStateBase>::Value,
"'T' template parameter to GetGameState must be derived from AGameStateBase");
29 return Cast<T>(GetOwner());
32 T* GetGameStateChecked()
const
34 static_assert(TPointerIsConvertibleFromTo<T, AGameStateBase>::Value,
"'T' template parameter to GetGameStateChecked must be derived from AGameStateBase");
35 return CastChecked<T>(GetOwner());
39 T* GetGameMode()
const
41 static_assert(TPointerIsConvertibleFromTo<T, AGameModeBase>::Value,
"'T' template parameter to GetGameMode must be derived from AGameModeBase");
42 return Cast<T>(GetGameStateChecked<AGameStateBase>()->AuthorityGameMode);
46 virtual void HandleMatchHasStarted() {}
50 virtual
void OnGameStateUpdated(const
FMatchState& MatchState);
53 virtual
void OnMultiplayerStateUpdated(const
EMatchState State);
56 virtual
bool PlayerAdded(APlayerState* PlayerState);
57 virtual
bool PlayerRemoved(APlayerState* PlayerState);
60 virtual
void BeginPlay() override;
EMatchState
Definition BaseData.h:1065
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition BaseData.h:1077