Created
April 22, 2020 01:26
-
-
Save chris-gong/22e246abd1e26dddbc8ea6c348a7b7d3 to your computer and use it in GitHub Desktop.
The GameLiftTutorialGameMode.h file after part 2 of the Flopperam UE4 GameLift tutorial series
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. | |
#pragma once | |
#include "CoreMinimal.h" | |
#include "GameLiftServerSDK.h" | |
#include "GameFramework/GameModeBase.h" | |
#include "GameLiftTutorialGameMode.generated.h" | |
USTRUCT() | |
struct FStartGameSessionState | |
{ | |
GENERATED_BODY(); | |
UPROPERTY() | |
bool Status; | |
FStartGameSessionState() { | |
Status = false; | |
} | |
}; | |
USTRUCT() | |
struct FUpdateGameSessionState | |
{ | |
GENERATED_BODY(); | |
FUpdateGameSessionState() { | |
} | |
}; | |
USTRUCT() | |
struct FProcessTerminateState | |
{ | |
GENERATED_BODY(); | |
UPROPERTY() | |
bool Status; | |
long TerminationTime; | |
FProcessTerminateState() { | |
Status = false; | |
} | |
}; | |
USTRUCT() | |
struct FHealthCheckState | |
{ | |
GENERATED_BODY(); | |
UPROPERTY() | |
bool Status; | |
FHealthCheckState() { | |
Status = false; | |
} | |
}; | |
UCLASS(minimalapi) | |
class AGameLiftTutorialGameMode : public AGameModeBase | |
{ | |
GENERATED_BODY() | |
public: | |
AGameLiftTutorialGameMode(); | |
protected: | |
virtual void BeginPlay() override; | |
private: | |
UPROPERTY() | |
FStartGameSessionState StartGameSessionState; | |
UPROPERTY() | |
FUpdateGameSessionState UpdateGameSessionState; | |
UPROPERTY() | |
FProcessTerminateState ProcessTerminateState; | |
UPROPERTY() | |
FHealthCheckState HealthCheckState; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment