32. Overlay Widget Controller
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
							
								
								
									
										8
									
								
								Project/Source/Gasa/Game/GasaPlayerController_Inlines.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Project/Source/Gasa/Game/GasaPlayerController_Inlines.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| #include "GasaPlayerController.h" | ||||
| #include "GasaPlayerState.h" | ||||
|  | ||||
| inline | ||||
| AGasaPlayerState* AGasaPlayerController::GetPlayerState() | ||||
| { | ||||
| 	return Cast<AGasaPlayerState>( PlayerState ); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user