Lesson 105 - Set up move to click.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "AbilitySystem/GameplayAbility/AuraGameplayAbility.h"
|
||||
#include "AuraAbilitySystemComponent.generated.h"
|
||||
|
||||
DECLARE_MULTICAST_DELEGATE_OneParam(FEffectAssetTags, const FGameplayTagContainer& /*AssetTags*/);
|
||||
@@ -18,6 +19,12 @@ class AURA_API UAuraAbilitySystemComponent : public UAbilitySystemComponent
|
||||
public:
|
||||
void AbilityActorInfoSet();
|
||||
FEffectAssetTags EffectAssetTags;
|
||||
|
||||
void AddCharacterAbilities(const TArray<TSubclassOf<UGameplayAbility>>& StartupAbilities);
|
||||
|
||||
void AbilityInputTagHeld(const FGameplayTag& InputTag);
|
||||
void AbilityInputTagReleased(const FGameplayTag& InputTag);
|
||||
|
||||
protected:
|
||||
void EffectApplied(UAbilitySystemComponent* AbilitySystemComponent, const FGameplayEffectSpec& EffectSpec, FActiveGameplayEffectHandle ActiveEffectHandle);
|
||||
};
|
||||
|
||||
@@ -39,13 +39,19 @@ public:
|
||||
FGameplayTag Attributes_Secondary_HealthRegeneration;
|
||||
FGameplayTag Attributes_Secondary_ManaRegeneration;
|
||||
|
||||
//Tertiary Stats - Resistances - Physical, Arcane, Fire, Lightning
|
||||
FGameplayTag Attributes_Resistance_Physical;
|
||||
FGameplayTag Attributes_Resistance_Arcane;
|
||||
FGameplayTag Attributes_Resistance_Fire;
|
||||
FGameplayTag Attributes_Resistance_Lightning;
|
||||
|
||||
protected:
|
||||
//Input Tags
|
||||
FGameplayTag Input_InputTag_LMB;
|
||||
FGameplayTag Input_InputTag_RMB;
|
||||
FGameplayTag Input_InputTag_1;
|
||||
FGameplayTag Input_InputTag_2;
|
||||
FGameplayTag Input_InputTag_3;
|
||||
FGameplayTag Input_InputTag_4;
|
||||
FGameplayTag Input_InputTag_5;
|
||||
FGameplayTag Input_InputTag_6;
|
||||
FGameplayTag Input_InputTag_7;
|
||||
FGameplayTag Input_InputTag_8;
|
||||
FGameplayTag Input_InputTag_9;
|
||||
FGameplayTag Input_InputTag_10;
|
||||
|
||||
private:
|
||||
static FAuraGameplayTags GameplayTags;
|
||||
|
||||
@@ -46,7 +46,11 @@ protected:
|
||||
|
||||
void ApplyEffectToSelf(TSubclassOf<UGameplayEffect> GameplayEffectClass, float Level) const;
|
||||
void InitializeDefaultAttributes() const;
|
||||
public:
|
||||
|
||||
|
||||
void AddCharacterAbilities();
|
||||
private:
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="Abilities")
|
||||
TArray<TSubclassOf<UGameplayAbility>> StartupAbilities;
|
||||
|
||||
};
|
||||
|
||||
@@ -5,13 +5,16 @@
|
||||
#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;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@@ -40,12 +43,29 @@ private:
|
||||
IEnemyInterface* LastActor;
|
||||
IEnemyInterface* ThisActor;
|
||||
|
||||
/*
|
||||
TObjectPtr<AActor> LastActor;
|
||||
TObjectPtr<AActor> ThisActor;
|
||||
void AbilityInputTagPressed(FGameplayTag InputTag);
|
||||
void AbilityInputTagReleased(FGameplayTag InputTag);
|
||||
void AbilityInputTagHeld(FGameplayTag InputTag);
|
||||
|
||||
FHitResult CursorHit;
|
||||
static void HightlightActor(AActor* Actor);
|
||||
static void UnHightlightActor(AActor* Actor);
|
||||
*/
|
||||
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;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user