Initialize Git with LFS for binary assets and add standard Unreal Engine .gitignore/.gitattributes. Co-authored-by: Cursor <cursoragent@cursor.com>
46 lines
1.2 KiB
C++
46 lines
1.2 KiB
C++
// REALMS IN RUIN. Copyright (c) 2025 Trevor Edwards. All rights reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/PlayerController.h"
|
|
#include "RIRPlayerController.generated.h"
|
|
|
|
class UInputAction;
|
|
class UInputMappingContext;
|
|
class ITargetInterface;
|
|
struct FInputActionValue;
|
|
|
|
UCLASS()
|
|
class REALMSINRUIN_API ARIRPlayerController : public APlayerController
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
ARIRPlayerController();
|
|
virtual void PlayerTick(float DeltaTime) override;
|
|
virtual void BindCallbacksToDependencies();
|
|
|
|
protected:
|
|
virtual void BeginPlay() override;
|
|
|
|
// Input bindings
|
|
virtual void SetupInputComponent() override;
|
|
|
|
// Handles movement input
|
|
void HandleMovementInput(const FInputActionValue& InputActionValue);
|
|
|
|
private:
|
|
// Input Mapping Context (to be assigned via editor)
|
|
UPROPERTY(EditAnywhere, Category = "Input")
|
|
TObjectPtr<UInputMappingContext> PlayerMappingContext;
|
|
|
|
// Input Action asset for movement (to be assigned via editor)
|
|
UPROPERTY(EditAnywhere, Category = "Input")
|
|
TObjectPtr<UInputAction> MovementInput;
|
|
|
|
// Called every frame or on-demand to perform a trace under the mouse cursor
|
|
void CursorTrace();
|
|
TScriptInterface<ITargetInterface> LastActor;
|
|
TScriptInterface<ITargetInterface> ThisActor;
|
|
}; |