47 lines
1.1 KiB
C
47 lines
1.1 KiB
C
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||
|
|
|
||
|
|
#pragma once
|
||
|
|
|
||
|
|
#include "CoreMinimal.h"
|
||
|
|
#include "GameFramework/PlayerController.h"
|
||
|
|
#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);
|
||
|
|
|
||
|
|
protected:
|
||
|
|
UPROPERTY(EditAnywhere, Category = "Input")
|
||
|
|
TObjectPtr<UInputMappingContext> InputContext;
|
||
|
|
|
||
|
|
UPROPERTY(EditAnywhere, Category= "Input")
|
||
|
|
TObjectPtr<UInputAction> MoveAction;
|
||
|
|
|
||
|
|
UPROPERTY(EditAnywhere, Category = "Input")
|
||
|
|
TObjectPtr<UInputAction> LookAction;
|
||
|
|
|
||
|
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Character")
|
||
|
|
TObjectPtr<ACharacter> PlayerCharacter;
|
||
|
|
};
|