refactor: rename template classes to APogo*, move gameplay BPs to /Game/Pogo
This commit is contained in:
1 parent
438b0f2154
commit
26a204b49c
83 files changed
+245
-179
No files matched your search
@@ -1,6 +1,6 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "TP_ThirdPersonCharacter.h"
|
||||
#include "PogoCharacter.h"
|
||||
#include "Engine/LocalPlayer.h"
|
||||
#include "Camera/CameraComponent.h"
|
||||
#include "Components/CapsuleComponent.h"
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "InputActionValue.h"
|
||||
#include "pogo.h"
|
||||
|
||||
ATP_ThirdPersonCharacter::ATP_ThirdPersonCharacter()
|
||||
APogoCharacter::APogoCharacter()
|
||||
{
|
||||
// Set size for collision capsule
|
||||
GetCapsuleComponent()->InitCapsuleSize(42.f, 96.0f);
|
||||
@@ -50,7 +50,7 @@ ATP_ThirdPersonCharacter::ATP_ThirdPersonCharacter()
|
||||
// are set in the derived blueprint asset named ThirdPersonCharacter (to avoid direct content references in C++)
|
||||
}
|
||||
|
||||
void ATP_ThirdPersonCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||
void APogoCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||
{
|
||||
// Set up action bindings
|
||||
if (UEnhancedInputComponent* EnhancedInputComponent = Cast<UEnhancedInputComponent>(PlayerInputComponent)) {
|
||||
@@ -60,11 +60,11 @@ void ATP_ThirdPersonCharacter::SetupPlayerInputComponent(UInputComponent* Player
|
||||
EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Completed, this, &ACharacter::StopJumping);
|
||||
|
||||
// Moving
|
||||
EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &ATP_ThirdPersonCharacter::Move);
|
||||
EnhancedInputComponent->BindAction(MouseLookAction, ETriggerEvent::Triggered, this, &ATP_ThirdPersonCharacter::Look);
|
||||
EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &APogoCharacter::Move);
|
||||
EnhancedInputComponent->BindAction(MouseLookAction, ETriggerEvent::Triggered, this, &APogoCharacter::Look);
|
||||
|
||||
// Looking
|
||||
EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &ATP_ThirdPersonCharacter::Look);
|
||||
EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &APogoCharacter::Look);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -72,7 +72,7 @@ void ATP_ThirdPersonCharacter::SetupPlayerInputComponent(UInputComponent* Player
|
||||
}
|
||||
}
|
||||
|
||||
void ATP_ThirdPersonCharacter::Move(const FInputActionValue& Value)
|
||||
void APogoCharacter::Move(const FInputActionValue& Value)
|
||||
{
|
||||
// input is a Vector2D
|
||||
FVector2D MovementVector = Value.Get<FVector2D>();
|
||||
@@ -81,7 +81,7 @@ void ATP_ThirdPersonCharacter::Move(const FInputActionValue& Value)
|
||||
DoMove(MovementVector.X, MovementVector.Y);
|
||||
}
|
||||
|
||||
void ATP_ThirdPersonCharacter::Look(const FInputActionValue& Value)
|
||||
void APogoCharacter::Look(const FInputActionValue& Value)
|
||||
{
|
||||
// input is a Vector2D
|
||||
FVector2D LookAxisVector = Value.Get<FVector2D>();
|
||||
@@ -90,7 +90,7 @@ void ATP_ThirdPersonCharacter::Look(const FInputActionValue& Value)
|
||||
DoLook(LookAxisVector.X, LookAxisVector.Y);
|
||||
}
|
||||
|
||||
void ATP_ThirdPersonCharacter::DoMove(float Right, float Forward)
|
||||
void APogoCharacter::DoMove(float Right, float Forward)
|
||||
{
|
||||
if (GetController() != nullptr)
|
||||
{
|
||||
@@ -110,7 +110,7 @@ void ATP_ThirdPersonCharacter::DoMove(float Right, float Forward)
|
||||
}
|
||||
}
|
||||
|
||||
void ATP_ThirdPersonCharacter::DoLook(float Yaw, float Pitch)
|
||||
void APogoCharacter::DoLook(float Yaw, float Pitch)
|
||||
{
|
||||
if (GetController() != nullptr)
|
||||
{
|
||||
@@ -120,13 +120,13 @@ void ATP_ThirdPersonCharacter::DoLook(float Yaw, float Pitch)
|
||||
}
|
||||
}
|
||||
|
||||
void ATP_ThirdPersonCharacter::DoJumpStart()
|
||||
void APogoCharacter::DoJumpStart()
|
||||
{
|
||||
// signal the character to jump
|
||||
Jump();
|
||||
}
|
||||
|
||||
void ATP_ThirdPersonCharacter::DoJumpEnd()
|
||||
void APogoCharacter::DoJumpEnd()
|
||||
{
|
||||
// signal the character to stop jumping
|
||||
StopJumping();
|
||||
@@ -5,21 +5,21 @@
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/Character.h"
|
||||
#include "Logging/LogMacros.h"
|
||||
#include "TP_ThirdPersonCharacter.generated.h"
|
||||
#include "PogoCharacter.generated.h"
|
||||
|
||||
class USpringArmComponent;
|
||||
class UCameraComponent;
|
||||
class UInputAction;
|
||||
struct FInputActionValue;
|
||||
|
||||
DECLARE_LOG_CATEGORY_EXTERN(LogTemplateCharacter, Log, All);
|
||||
DECLARE_LOG_CATEGORY_EXTERN(LogPogoCharacter, Log, All);
|
||||
|
||||
/**
|
||||
* A simple player-controllable third person character
|
||||
* Implements a controllable orbiting camera
|
||||
*/
|
||||
UCLASS(abstract)
|
||||
class ATP_ThirdPersonCharacter : public ACharacter
|
||||
class APogoCharacter : public ACharacter
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@@ -52,7 +52,7 @@ protected:
|
||||
public:
|
||||
|
||||
/** Constructor */
|
||||
ATP_ThirdPersonCharacter();
|
||||
APogoCharacter();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "PogoGameMode.h"
|
||||
|
||||
APogoGameMode::APogoGameMode()
|
||||
{
|
||||
// stub
|
||||
}
|
||||
@@ -4,20 +4,20 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/GameModeBase.h"
|
||||
#include "TP_ThirdPersonGameMode.generated.h"
|
||||
#include "PogoGameMode.generated.h"
|
||||
|
||||
/**
|
||||
* Simple GameMode for a third person game
|
||||
*/
|
||||
UCLASS(abstract)
|
||||
class ATP_ThirdPersonGameMode : public AGameModeBase
|
||||
class APogoGameMode : public AGameModeBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
|
||||
/** Constructor */
|
||||
ATP_ThirdPersonGameMode();
|
||||
APogoGameMode();
|
||||
};
|
||||
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
|
||||
#include "TP_ThirdPersonPlayerController.h"
|
||||
#include "PogoPlayerController.h"
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
#include "Engine/LocalPlayer.h"
|
||||
#include "InputMappingContext.h"
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "pogo.h"
|
||||
#include "Widgets/Input/SVirtualJoystick.h"
|
||||
|
||||
void ATP_ThirdPersonPlayerController::BeginPlay()
|
||||
void APogoPlayerController::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
@@ -33,7 +33,7 @@ void ATP_ThirdPersonPlayerController::BeginPlay()
|
||||
}
|
||||
}
|
||||
|
||||
void ATP_ThirdPersonPlayerController::SetupInputComponent()
|
||||
void APogoPlayerController::SetupInputComponent()
|
||||
{
|
||||
Super::SetupInputComponent();
|
||||
|
||||
@@ -60,7 +60,7 @@ void ATP_ThirdPersonPlayerController::SetupInputComponent()
|
||||
}
|
||||
}
|
||||
|
||||
bool ATP_ThirdPersonPlayerController::ShouldUseTouchControls() const
|
||||
bool APogoPlayerController::ShouldUseTouchControls() const
|
||||
{
|
||||
// are we on a mobile platform? Should we force touch?
|
||||
return SVirtualJoystick::ShouldDisplayTouchInterface() || bForceTouchControls;
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "TP_ThirdPersonPlayerController.generated.h"
|
||||
#include "PogoPlayerController.generated.h"
|
||||
|
||||
class UInputMappingContext;
|
||||
class UUserWidget;
|
||||
@@ -14,7 +14,7 @@ class UUserWidget;
|
||||
* Manages input mappings
|
||||
*/
|
||||
UCLASS(abstract)
|
||||
class ATP_ThirdPersonPlayerController : public APlayerController
|
||||
class APogoPlayerController : public APlayerController
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "TP_ThirdPersonGameMode.h"
|
||||
|
||||
ATP_ThirdPersonGameMode::ATP_ThirdPersonGameMode()
|
||||
{
|
||||
// stub
|
||||
}
|
||||
Reference in new issue
Block a user