2025-02-12 19:10:23 +01:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "GameFramework/PlayerController.h"
|
2025-02-17 15:28:18 +01:00
|
|
|
#include <Player/InteractionComponent.h>
|
2025-02-12 19:10:23 +01:00
|
|
|
#include "ExoPlayerController.generated.h"
|
|
|
|
|
|
|
|
|
|
class UInputMappingContext;
|
|
|
|
|
class UInputAction;
|
|
|
|
|
struct FInputActionValue;
|
|
|
|
|
|
|
|
|
|
UCLASS()
|
|
|
|
|
class EXO_API AExoPlayerController : public APlayerController
|
|
|
|
|
{
|
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
AExoPlayerController();
|
|
|
|
|
|
|
|
|
|
virtual void BeginPlay() override;
|
|
|
|
|
|
|
|
|
|
virtual void PlayerTick(float DeltaTime) override;
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual void SetupInputComponent() override;
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Input")
|
|
|
|
|
void Move(const FInputActionValue& InputActionValue);
|
|
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "Input")
|
|
|
|
|
void Look(const FInputActionValue& InputActionValue);
|
|
|
|
|
|
2025-02-17 15:28:18 +01:00
|
|
|
UFUNCTION(BlueprintCallable, Category = "Input")
|
|
|
|
|
void Interact(const FInputActionValue& InputActionValue);
|
|
|
|
|
|
2025-02-12 19:10:23 +01:00
|
|
|
protected:
|
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Input")
|
|
|
|
|
TObjectPtr<UInputMappingContext> InputContext;
|
|
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category= "Input")
|
|
|
|
|
TObjectPtr<UInputAction> MoveAction;
|
|
|
|
|
|
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Input")
|
|
|
|
|
TObjectPtr<UInputAction> LookAction;
|
|
|
|
|
|
2025-02-17 15:28:18 +01:00
|
|
|
UPROPERTY(EditAnywhere, Category = "Input")
|
|
|
|
|
TObjectPtr<UInputAction> InteractAction;
|
|
|
|
|
|
2025-02-12 19:10:23 +01:00
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Character")
|
|
|
|
|
TObjectPtr<ACharacter> PlayerCharacter;
|
2025-02-17 15:28:18 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
UInteractionComponent* InteractionComponent;
|
2025-02-12 19:10:23 +01:00
|
|
|
};
|