32. Overlay Widget Controller

This commit is contained in:
2024-04-21 18:56:57 -04:00
parent adfb17b7df
commit 811dc33f4a
40 changed files with 326 additions and 157 deletions

View File

@ -1,4 +1,5 @@
#include "GasaPlayerController.h"
#include "GasaPlayerController_Inlines.h"
#include "AbilitySystemComponent.h"
#include "Engine/LocalPlayer.h"
@ -12,7 +13,6 @@
#include "Components/CapsuleComponent.h"
#include "GameFramework/SpringArmComponent.h"
#include "Kismet/KismetSystemLibrary.h"
using namespace Gasa;
AGasaPlayerController::AGasaPlayerController()
@ -24,6 +24,8 @@ AGasaPlayerController::AGasaPlayerController()
bReplicates = true;
}
#pragma region Input
void AGasaPlayerController::Move(FInputActionValue const& ActionValue)
{
@ -31,8 +33,6 @@ void AGasaPlayerController::Move(FInputActionValue const& ActionValue)
if (pawn == nullptr )
return;
// Note(Ed): I did the follow optimization for practice, they are completely unnecessary for this context.
#if 0
FVector2D AxisV = ActionValue.Get<FVector2D>();
@ -77,6 +77,7 @@ void AGasaPlayerController::SpawnDefaultHUD()
Super::SpawnDefaultHUD();
}
// TODO(Ed): We need to setup Net Slime...
void AGasaPlayerController::OnPossess(APawn* InPawn)
{
Super::OnPossess(InPawn);

View File

@ -1,7 +1,6 @@
#pragma once
#include "GasaCommon.h"
#include "GasaPlayerState.h"
#include "GameFramework/PlayerController.h"
#include "GasaPlayerController.generated.h"
@ -51,10 +50,7 @@ public:
AGasaPlayerController();
AGasaPlayerState* GetPlayerState()
{
return Cast<AGasaPlayerState>( PlayerState );
}
inline AGasaPlayerState* GetPlayerState();
#pragma region PlayerController
void SpawnDefaultHUD() override;

View File

@ -0,0 +1,8 @@
#include "GasaPlayerController.h"
#include "GasaPlayerState.h"
inline
AGasaPlayerState* AGasaPlayerController::GetPlayerState()
{
return Cast<AGasaPlayerState>( PlayerState );
}