From 62b44ce66162a1fb264bc81ebd10afac51bffb5e Mon Sep 17 00:00:00 2001 From: Maxim <73167493+m4xxx1m@users.noreply.github.com> Date: Tue, 7 Mar 2023 14:31:21 +0300 Subject: [PATCH] added some minimal core code --- Config/DefaultEngine.ini | 17 +++- Config/DefaultInput.ini | 86 ++++++++++++++++++ Content/BattleField/BattleFieldMap.umap | Bin 629060 -> 630453 bytes Content/MainMenu/MainMenuLevel.umap | Bin 33770 -> 34451 bytes Source/TurnBasedTutorial/MyGameMode.cpp | 30 +++++- Source/TurnBasedTutorial/MyGameMode.h | 17 +++- .../TurnBasedTutorial/MyPlayerController.cpp | 28 ++++++ Source/TurnBasedTutorial/MyPlayerController.h | 30 ++++++ Source/TurnBasedTutorial/MyPlayerState.cpp | 5 + Source/TurnBasedTutorial/MyPlayerState.h | 17 ++++ Source/TurnBasedTutorial/Trooper.cpp | 24 +++++ Source/TurnBasedTutorial/Trooper.h | 31 +++++++ .../TurnBasedTutorialGameModeBase.cpp | 5 - .../TurnBasedTutorialGameModeBase.h | 17 ---- 14 files changed, 276 insertions(+), 31 deletions(-) create mode 100644 Config/DefaultInput.ini create mode 100644 Source/TurnBasedTutorial/MyPlayerController.cpp create mode 100644 Source/TurnBasedTutorial/MyPlayerController.h create mode 100644 Source/TurnBasedTutorial/MyPlayerState.cpp create mode 100644 Source/TurnBasedTutorial/MyPlayerState.h create mode 100644 Source/TurnBasedTutorial/Trooper.cpp create mode 100644 Source/TurnBasedTutorial/Trooper.h delete mode 100644 Source/TurnBasedTutorial/TurnBasedTutorialGameModeBase.cpp delete mode 100644 Source/TurnBasedTutorial/TurnBasedTutorialGameModeBase.h diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 9d7116b..50c64f0 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -1,10 +1,19 @@ [/Script/EngineSettings.GameMapsSettings] -GameDefaultMap=/Game/MainMenu/MainMenuLevel - - -EditorStartupMap=/Game/StarterContent/Maps/Minimal_Default +EditorStartupMap=/Game/BattleField/BattleFieldMap.BattleFieldMap +LocalMapOptions= +TransitionMap=None +bUseSplitscreen=True +TwoPlayerSplitscreenLayout=Horizontal +ThreePlayerSplitscreenLayout=FavorTop +FourPlayerSplitscreenLayout=Grid +bOffsetPlayerGamepadIds=False +GameInstanceClass=/Script/Engine.GameInstance +GameDefaultMap=/Game/MainMenu/MainMenuLevel.MainMenuLevel +ServerDefaultMap=/Engine/Maps/Entry.Entry +GlobalDefaultGameMode=/Script/TurnBasedTutorial.MyGameMode +GlobalDefaultServerGameMode=None [/Script/HardwareTargeting.HardwareTargetingSettings] TargetedHardwareClass=Desktop diff --git a/Config/DefaultInput.ini b/Config/DefaultInput.ini new file mode 100644 index 0000000..07e992c --- /dev/null +++ b/Config/DefaultInput.ini @@ -0,0 +1,86 @@ +[/Script/Engine.InputSettings] +-AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.25,Exponent=1.f,Sensitivity=1.f)) +-AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) +-AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) +-AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.f,Exponent=1.f,Sensitivity=0.07f)) ++AxisConfig=(AxisKeyName="Gamepad_LeftX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_LeftY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_RightX",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_RightY",AxisProperties=(DeadZone=0.250000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MouseX",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MouseY",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Mouse2D",AxisProperties=(DeadZone=0.000000,Sensitivity=0.070000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MouseWheelAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_LeftTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_RightTriggerAxis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_Special_Left_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Gamepad_Special_Left_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Daydream_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Daydream_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Daydream_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Daydream_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="Vive_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="MixedReality_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="OculusTouch_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Left_Trackpad_Touch",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Grip_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trigger_Axis",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Thumbstick_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_X",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Y",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) ++AxisConfig=(AxisKeyName="ValveIndex_Right_Trackpad_Force",AxisProperties=(DeadZone=0.000000,Sensitivity=1.000000,Exponent=1.000000,bInvert=False)) +bAltEnterTogglesFullscreen=True +bF11TogglesFullscreen=True +bUseMouseForTouch=False +bEnableMouseSmoothing=True +bEnableFOVScaling=True +bCaptureMouseOnLaunch=True +bAlwaysShowTouchInterface=False +bShowConsoleOnFourFingerTap=True +bEnableGestureRecognizer=False +bUseAutocorrect=False +DefaultViewportMouseCaptureMode=CapturePermanently_IncludingInitialMouseDown +DefaultViewportMouseLockMode=LockOnCapture +FOVScale=0.011110 +DoubleClickTime=0.200000 ++ActionMappings=(ActionName="MyAction",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftMouseButton) +DefaultPlayerInputClass=/Script/Engine.PlayerInput +DefaultInputComponentClass=/Script/Engine.InputComponent +DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks +-ConsoleKeys=Tilde ++ConsoleKeys=Tilde + diff --git a/Content/BattleField/BattleFieldMap.umap b/Content/BattleField/Batt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Logined")); + StartGame(); + } +} + +void AMyGameMode::StartGame() { + FVector Location(0.0f, 0.0f, 0.0f); + FRotator Rotation(0.0f, 0.0f, 0.0f); + FActorSpawnParameters SpawnInfo; + GetWorld()->SpawnActor(Location, Rotation, SpawnInfo); + GetPlayerController()->StartTurn(); +} +AMyPlayerController *AMyGameMode::GetPlayerController() { + return dynamic_cast( + UGameplayStatics::GetPlayerController(GetWorld(), 0) + ); +} diff --git a/Source/TurnBasedTutorial/MyGameMode.h b/Source/TurnBasedTutorial/MyGameMode.h index 8993397..f7cccbe 100644 --- a/Source/TurnBasedTutorial/MyGameMode.h +++ b/Source/TurnBasedTutorial/MyGameMode.h @@ -3,15 +3,24 @@ #pragma once #include "CoreMinimal.h" +#include "MyPlayerController.h" #include "GameFramework/GameMode.h" #include "MyGameMode.generated.h" -/** - * - */ + + UCLASS() class TURNBASEDTUTORIAL_API AMyGameMode : public AGameMode { GENERATED_BODY() - + +public: + AMyGameMode(); + + void BeginPlay() override; + +private: + void StartGame(); + + AMyPlayerController *GetPlayerController(); }; diff --git a/Source/TurnBasedTutorial/MyPlayerController.cpp b/Source/TurnBasedTutorial/MyPlayerController.cpp new file mode 100644 index 0000000..576b5ec --- /dev/null +++ b/Source/TurnBasedTutorial/MyPlayerController.cpp @@ -0,0 +1,28 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "MyPlayerController.h" + +AMyPlayerController::AMyPlayerController() : Super(), isMyTurn(false) { + UE_LOG(LogTemp, Warning, TEXT("Player controller created")); +} + +void AMyPlayerController::SetupInputComponent() { + Super::SetupInputComponent(); + InputComponent->BindAction("MyAction", IE_Pressed, this, + &AMyPlayerController::OnLeftMouseClick); +} + +void AMyPlayerController::StartTurn() { + isMyTurn = true; + UE_LOG(LogTemp, Warning, TEXT("Your turn")); +} + +void AMyPlayerController::EndTurn() { + isMyTurn = false; + UE_LOG(LogTemp, Warning, TEXT("Not your turn")); +} + +void AMyPlayerController::OnLeftMouseClick() { + UE_LOG(LogTemp, Warning, TEXT("Mouse clicked")); +} diff --git a/Source/TurnBasedTutorial/MyPlayerController.h b/Source/TurnBasedTutorial/MyPlayerController.h new file mode 100644 index 0000000..980eabb --- /dev/null +++ b/Source/TurnBasedTutorial/MyPlayerController.h @@ -0,0 +1,30 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/PlayerController.h" +#include "MyPlayerController.generated.h" + +/** + * + */ +UCLASS() +class TURNBASEDTUTORIAL_API AMyPlayerController : public APlayerController +{ + GENERATED_BODY() + +public: + AMyPlayerController(); + + void StartTurn(); + + void EndTurn(); + + virtual void SetupInputComponent() override; + +private: + bool isMyTurn; + + void OnLeftMouseClick(); +}; diff --git a/Source/TurnBasedTutorial/MyPlayerState.cpp b/Source/TurnBasedTutorial/MyPlayerState.cpp new file mode 100644 index 0000000..00bda13 --- /dev/null +++ b/Source/TurnBasedTutorial/MyPlayerState.cpp @@ -0,0 +1,5 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "MyPlayerState.h" + diff --git a/Source/TurnBasedTutorial/MyPlayerState.h b/Source/TurnBasedTutorial/MyPlayerState.h new file mode 100644 index 0000000..991a5cb --- /dev/null +++ b/Source/TurnBasedTutorial/MyPlayerState.h @@ -0,0 +1,17 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/PlayerState.h" +#include "MyPlayerState.generated.h" + +/** + * + */ +UCLASS() +class TURNBASEDTUTORIAL_API AMyPlayerState : public APlayerState +{ + GENERATED_BODY() + +}; diff --git a/Source/TurnBasedTutorial/Trooper.cpp b/Source/TurnBasedTutorial/Trooper.cpp new file mode 100644 index 0000000..a762cb8 --- /dev/null +++ b/Source/TurnBasedTutorial/Trooper.cpp @@ -0,0 +1,24 @@ +#include "Trooper.h" + +// Sets default values +ATrooper::ATrooper() { + Position.Set(0, 0, 0); + Mesh = CreateDefaultSubobject("Mesh"); + RootComponent = Mesh; + static ConstructorHelpers::FObjectFinder MeshToUse(TEXT( + "StaticMesh'/Game/StarterContent/Props/SM_Chair.SM_Chair'" + )); + if (MeshToUse.Object) + { + Mesh->SetStaticMesh(MeshToUse.Object); + } +} + +// Called when the game starts or when spawned +void ATrooper::BeginPlay() +{ + Super::BeginPlay(); + +} + + diff --git a/Source/TurnBasedTutorial/Trooper.h b/Source/TurnBasedTutorial/Trooper.h new file mode 100644 index 0000000..fbfe19d --- /dev/null +++ b/Source/TurnBasedTutorial/Trooper.h @@ -0,0 +1,31 @@ + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "Components/StaticMeshComponent.h" +#include "Trooper.generated.h" + +UCLASS() +class TURNBASEDTUTORIAL_API ATrooper : public AActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + ATrooper(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + + UPROPERTY() + FVector Position; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly) + UStaticMeshComponent* Mesh; + +public: + void MoveTrooper(); + +}; diff --git a/Source/TurnBasedTutorial/TurnBasedTutorialGameModeBase.cpp b/Source/TurnBasedTutorial/TurnBasedTutorialGameModeBase.cpp deleted file mode 100644 index 67d5b7f..0000000 --- a/Source/TurnBasedTutorial/TurnBasedTutorialGameModeBase.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - - -#include "TurnBasedTutorialGameModeBase.h" - diff --git a/Source/TurnBasedTutorial/TurnBasedTutorialGameModeBase.h b/Source/TurnBasedTutorial/TurnBasedTutorialGameModeBase.h deleted file mode 100644 index 50946a2..0000000 --- a/Source/TurnBasedTutorial/TurnBasedTutorialGameModeBase.h +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#pragma once - -#include "CoreMinimal.h" -#include "GameFramework/GameModeBase.h" -#include "TurnBasedTutorialGameModeBase.generated.h" - -/** - * - */ -UCLASS() -class TURNBASEDTUTORIAL_API ATurnBasedTutorialGameModeBase : public AGameModeBase -{ - GENERATED_BODY() - -};