26 lines
942 B
C++
26 lines
942 B
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "ProjectFishGameMode.h"
|
|
#include "ProjectFishPlayerController.h"
|
|
#include "ProjectFishCharacter.h"
|
|
#include "UObject/ConstructorHelpers.h"
|
|
|
|
AProjectFishGameMode::AProjectFishGameMode()
|
|
{
|
|
// use our custom PlayerController class
|
|
PlayerControllerClass = AProjectFishPlayerController::StaticClass();
|
|
|
|
// set default pawn class to our Blueprinted character
|
|
static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/TopDown/Blueprints/BP_TopDownCharacter"));
|
|
if (PlayerPawnBPClass.Class != nullptr)
|
|
{
|
|
DefaultPawnClass = PlayerPawnBPClass.Class;
|
|
}
|
|
|
|
// set default controller to our Blueprinted controller
|
|
static ConstructorHelpers::FClassFinder<APlayerController> PlayerControllerBPClass(TEXT("/Game/TopDown/Blueprints/BP_TopDownPlayerController"));
|
|
if(PlayerControllerBPClass.Class != NULL)
|
|
{
|
|
PlayerControllerClass = PlayerControllerBPClass.Class;
|
|
}
|
|
} |