// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "GameFramework/GameModeBase.h" #include "ShooterGameMode.generated.h" class UShooterUI; /** * Simple GameMode for a first person shooter game * Manages game UI * Keeps track of team scores */ UCLASS(abstract) class AUDIOVIDEORECORD_API AShooterGameMode : public AGameModeBase { GENERATED_BODY() protected: /** Type of UI widget to spawn */ UPROPERTY(EditAnywhere, Category="Shooter") TSubclassOf ShooterUIClass; /** Pointer to the UI widget */ TObjectPtr ShooterUI; /** Map of scores by team ID */ TMap TeamScores; protected: /** Gameplay initialization */ virtual void BeginPlay() override; public: /** Increases the score for the given team */ void IncrementTeamScore(uint8 TeamByte); };