init
This commit is contained in:
42
Source/AudioVideoRecord/Variant_Shooter/ShooterGameMode.h
Normal file
42
Source/AudioVideoRecord/Variant_Shooter/ShooterGameMode.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// 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<UShooterUI> ShooterUIClass;
|
||||
|
||||
/** Pointer to the UI widget */
|
||||
TObjectPtr<UShooterUI> ShooterUI;
|
||||
|
||||
/** Map of scores by team ID */
|
||||
TMap<uint8, int32> TeamScores;
|
||||
|
||||
protected:
|
||||
|
||||
/** Gameplay initialization */
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
public:
|
||||
|
||||
/** Increases the score for the given team */
|
||||
void IncrementTeamScore(uint8 TeamByte);
|
||||
};
|
||||
Reference in New Issue
Block a user