72 lines
1.7 KiB
C++
72 lines
1.7 KiB
C++
// Copyright Echo Devgroup
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/PlayerController.h"
|
|
#include "Interact/EnemyInterface.h"
|
|
#include "GameplayTagContainer.h"
|
|
#include "AuraPlayerController.generated.h"
|
|
|
|
class UAuraInputConfig;
|
|
class UInputMappingContext;
|
|
class UInputAction;
|
|
struct FInputActionValue;
|
|
class IEnemyInterface;
|
|
class UAuraAbilitySystemComponent;
|
|
class USplineComponent;
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class AURA_API AAuraPlayerController : public APlayerController
|
|
{
|
|
GENERATED_BODY()
|
|
public:
|
|
AAuraPlayerController();
|
|
virtual void PlayerTick(float DeltaTime) override;
|
|
|
|
protected:
|
|
virtual void BeginPlay() override;
|
|
virtual void SetupInputComponent() override;
|
|
|
|
private:
|
|
UPROPERTY(EditAnywhere, Category = "Input")
|
|
TObjectPtr<UInputMappingContext> AuraContext;
|
|
|
|
UPROPERTY(EditAnywhere, Category = "Input")
|
|
TObjectPtr<UInputAction> MoveAction;
|
|
|
|
void Move(const FInputActionValue& InputActionValue);
|
|
|
|
void CursorTrace();
|
|
IEnemyInterface* LastActor;
|
|
IEnemyInterface* ThisActor;
|
|
|
|
void AbilityInputTagPressed(FGameplayTag InputTag);
|
|
void AbilityInputTagReleased(FGameplayTag InputTag);
|
|
void AbilityInputTagHeld(FGameplayTag InputTag);
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UAuraAbilitySystemComponent> AuraAbilitySystemComponent;
|
|
|
|
UAuraAbilitySystemComponent* GetASC();
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "Input")
|
|
TObjectPtr<UAuraInputConfig> InputConfig;
|
|
|
|
//Click to move
|
|
FVector CachedDestination = FVector::ZeroVector;
|
|
float FollowTime = 0.0f;
|
|
float ShortPressedThreshhold = 0.5f;
|
|
bool bAutoRunning = false;
|
|
bool bTargeting = false;
|
|
|
|
UPROPERTY(EditDefaultsOnly, Category = "Input")
|
|
float AutoRunAcceptanceRadius = 50.f;
|
|
|
|
UPROPERTY(VisibleAnywhere, Category = "Input")
|
|
TObjectPtr<USplineComponent> Spline;
|
|
|
|
};
|