-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGiveAbilityWithInputTag.h
65 lines (47 loc) · 1.93 KB
/
GiveAbilityWithInputTag.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "GameplayTagContainer.h"
#include "Components/CapsuleComponent.h"
#include "GiveAbilityActor.generated.h"
class ULyraGameplayAbility;
USTRUCT(BlueprintType)
struct FGiveAbilityActor_GameplayAbility
{
GENERATED_BODY()
public:
// Gameplay ability to grant.
UPROPERTY(EditAnywhere,BlueprintReadWrite)
TSubclassOf<ULyraGameplayAbility> Ability = nullptr;
// Level of ability to grant.
UPROPERTY(EditAnywhere,BlueprintReadWrite)
int32 AbilityLevel = 1;
// Tag used to process input for the ability.
UPROPERTY(EditAnywhere,BlueprintReadWrite, Meta = (Categories = "InputTag"))
FGameplayTag InputTag;
UPROPERTY(EditAnywhere,BlueprintReadWrite)
bool bAllowStacking = false;
};
UCLASS()
class FPSROGUELIKERUNTIME_API AGiveAbilityActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AGiveAbilityActor();
// declare overlap begin function
UFUNCTION()
void OnOverlapBegin(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
// declare overlap end function
UFUNCTION()
void OnOverlapEnd(class UPrimitiveComponent* OverlappedComp, class AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex);
UPROPERTY(VisibleAnywhere, Category = "Trigger Capsule")
class UCapsuleComponent* TriggerCapsule;
// Gameplay abilities to grant when this ability set is granted.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Abilities")
TArray<FGiveAbilityActor_GameplayAbility> GrantedGameplayAbilities;
// Gameplay abilities to grant when this ability set is granted.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Gameplay Abilities")
bool bEnableDebugMessages = false;;
};