Skip to content
This repository was archived by the owner on Jun 7, 2025. It is now read-only.

Commit d777b28

Browse files
committed
Implement a getter function
1 parent 6390b7e commit d777b28

6 files changed

Lines changed: 28 additions & 0 deletions

File tree

Source/TrickyInteractionSystem/Private/InteractionTriggers/BoxInteractionTrigger.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ void UBoxInteractionTrigger::SetInteractionSettings(const FInteractionData& Valu
2020
InteractionSettings.Actor = GetOwner();
2121
}
2222

23+
FInteractionData UBoxInteractionTrigger::GetInteractionSettings() const
24+
{
25+
return InteractionSettings;
26+
}
27+
2328
void UBoxInteractionTrigger::BeginPlay()
2429
{
2530
Super::BeginPlay();

Source/TrickyInteractionSystem/Private/InteractionTriggers/CapsuleInteractionTrigger.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ void UCapsuleInteractionTrigger::SetInteractionSettings(const FInteractionData&
2020
InteractionSettings.Actor = GetOwner();
2121
}
2222

23+
FInteractionData UCapsuleInteractionTrigger::GetInteractionSettings() const
24+
{
25+
return InteractionSettings;
26+
}
27+
2328
void UCapsuleInteractionTrigger::BeginPlay()
2429
{
2530
Super::BeginPlay();

Source/TrickyInteractionSystem/Private/InteractionTriggers/SphereInteractionTrigger.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ void USphereInteractionTrigger::SetInteractionSettings(const FInteractionData& V
2222
InteractionSettings.Actor = GetOwner();
2323
}
2424

25+
FInteractionData USphereInteractionTrigger::GetInteractionSettings() const
26+
{
27+
return InteractionSettings;
28+
}
29+
2530
void USphereInteractionTrigger::BeginPlay()
2631
{
2732
Super::BeginPlay();

Source/TrickyInteractionSystem/Public/InteractionTriggers/BoxInteractionTrigger.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class TRICKYINTERACTIONSYSTEM_API UBoxInteractionTrigger : public UBoxComponent
2121
UFUNCTION(BlueprintSetter, Category="TrickyInteractionSystem")
2222
void SetInteractionSettings(const FInteractionData& Value);
2323

24+
UFUNCTION(BlueprintGetter, Category="TrickyInteractionSystem")
25+
FInteractionData GetInteractionSettings() const;
26+
2427
protected:
2528
virtual void BeginPlay() override;
2629

@@ -32,6 +35,7 @@ class TRICKYINTERACTIONSYSTEM_API UBoxInteractionTrigger : public UBoxComponent
3235
bool bIsNormalTrigger = false;
3336

3437
UPROPERTY(EditDefaultsOnly,
38+
BlueprintGetter=GetInteractionSettings,
3539
BlueprintSetter=SetInteractionSettings,
3640
Category="Interaction",
3741
meta=(AllowPrivateAccess))

Source/TrickyInteractionSystem/Public/InteractionTriggers/CapsuleInteractionTrigger.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ class TRICKYINTERACTIONSYSTEM_API UCapsuleInteractionTrigger : public UCapsuleCo
1717

1818
public:
1919
UCapsuleInteractionTrigger();
20+
2021
UFUNCTION(BlueprintSetter, Category="TrickyInteractionSystem")
2122
void SetInteractionSettings(const FInteractionData& Value);
2223

24+
UFUNCTION(BlueprintGetter, Category="TrickyInteractionSystem")
25+
FInteractionData GetInteractionSettings() const;
26+
2327
protected:
2428
virtual void BeginPlay() override;
2529

@@ -31,6 +35,7 @@ class TRICKYINTERACTIONSYSTEM_API UCapsuleInteractionTrigger : public UCapsuleCo
3135
bool bIsNormalTrigger = false;
3236

3337
UPROPERTY(EditDefaultsOnly,
38+
BlueprintGetter=GetInteractionSettings,
3439
BlueprintSetter=SetInteractionSettings,
3540
Category="Interaction",
3641
meta=(AllowPrivateAccess))

Source/TrickyInteractionSystem/Public/InteractionTriggers/SphereInteractionTrigger.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class TRICKYINTERACTIONSYSTEM_API USphereInteractionTrigger : public USphereComp
2121
UFUNCTION(BlueprintSetter, Category="TrickyInteractionSystem")
2222
void SetInteractionSettings(const FInteractionData& Value);
2323

24+
UFUNCTION(BlueprintGetter, Category="TrickyInteractionSystem")
25+
FInteractionData GetInteractionSettings() const;
26+
2427
protected:
2528
virtual void BeginPlay() override;
2629

@@ -32,6 +35,7 @@ class TRICKYINTERACTIONSYSTEM_API USphereInteractionTrigger : public USphereComp
3235
bool bIsNormalTrigger = false;
3336

3437
UPROPERTY(EditDefaultsOnly,
38+
BlueprintGetter=GetInteractionSettings,
3539
BlueprintSetter=SetInteractionSettings,
3640
Category="Interaction",
3741
meta=(AllowPrivateAccess))

0 commit comments

Comments
 (0)