31. Aura HUD (plus other stuff)
- Enabled a few more plugins - Added clang formatting straight from the GasaGen cpp. - Setup auto-generation of the DevOptionsCache - Messed around with generating widgettree hiearchy from template widget
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
#include "Engine/LocalPlayer.h"
|
||||
#include "EnhancedInputComponent.h"
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
#include "GasaDevOptions.h"
|
||||
#include "GasaPlayerState.h"
|
||||
#include "Actors/CameraMount.h"
|
||||
#include "Camera/CameraComponent.h"
|
||||
@ -12,6 +13,8 @@
|
||||
#include "GameFramework/SpringArmComponent.h"
|
||||
#include "Kismet/KismetSystemLibrary.h"
|
||||
|
||||
using namespace Gasa;
|
||||
|
||||
AGasaPlayerController::AGasaPlayerController()
|
||||
{
|
||||
PrimaryActorTick.bCanEverTick = true;
|
||||
@ -21,11 +24,14 @@ AGasaPlayerController::AGasaPlayerController()
|
||||
bReplicates = true;
|
||||
}
|
||||
|
||||
#pragma region Input
|
||||
void AGasaPlayerController::Move(FInputActionValue const& ActionValue)
|
||||
{
|
||||
APawn* pawn = GetPawn<APawn>();
|
||||
if (pawn == nullptr )
|
||||
return;
|
||||
|
||||
|
||||
|
||||
// Note(Ed): I did the follow optimization for practice, they are completely unnecessary for this context.
|
||||
#if 0
|
||||
@ -63,6 +69,13 @@ void AGasaPlayerController::Move(FInputActionValue const& ActionValue)
|
||||
pawn->AddMovementInput( MoveDir );
|
||||
#endif
|
||||
}
|
||||
#pragma endregion Input
|
||||
|
||||
#pragma region PlayerController
|
||||
void AGasaPlayerController::SpawnDefaultHUD()
|
||||
{
|
||||
Super::SpawnDefaultHUD();
|
||||
}
|
||||
|
||||
void AGasaPlayerController::OnPossess(APawn* InPawn)
|
||||
{
|
||||
@ -86,7 +99,6 @@ void AGasaPlayerController::OnUnPossess()
|
||||
Super::OnUnPossess();
|
||||
}
|
||||
|
||||
#pragma region PlayerController
|
||||
void AGasaPlayerController::PlayerTick(float DeltaTime)
|
||||
{
|
||||
Super::PlayerTick(DeltaTime);
|
||||
@ -162,7 +174,7 @@ void AGasaPlayerController::PostInitializeComponents()
|
||||
{
|
||||
Super::PostInitializeComponents();
|
||||
|
||||
Cam = GetWorld()->SpawnActor<ACameraMount>(CamClass, FActorSpawnParameters() );
|
||||
Cam = GetWorld()->SpawnActor<ACameraMount>(GetDevOptions()->Template_PlayerCamera.Get(), FActorSpawnParameters() );
|
||||
SetViewTarget(Cam);
|
||||
}
|
||||
|
||||
|
@ -12,9 +12,6 @@ class GASA_API AGasaPlayerController : public APlayerController
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
#pragma region Camera
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TSubclassOf<ACameraMount> CamClass;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||
TObjectPtr<ACameraMount> Cam;
|
||||
#pragma endregion Camera
|
||||
@ -60,6 +57,8 @@ public:
|
||||
}
|
||||
|
||||
#pragma region PlayerController
|
||||
void SpawnDefaultHUD() override;
|
||||
|
||||
void OnPossess(APawn* InPawn) override;
|
||||
|
||||
void OnUnPossess() override;
|
||||
|
1
Project/Source/Gasa/Game/GasaViewport.cpp
Normal file
1
Project/Source/Gasa/Game/GasaViewport.cpp
Normal file
@ -0,0 +1 @@
|
||||
#include "GasaViewport.h"
|
12
Project/Source/Gasa/Game/GasaViewport.h
Normal file
12
Project/Source/Gasa/Game/GasaViewport.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "Engine/GameViewportClient.h"
|
||||
|
||||
#include "GasaViewport.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class GASA_API UGasaViewport : public UGameViewportClient
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
};
|
Reference in New Issue
Block a user