LEAP Documentation 40220
Documentation for the LEAP project
ReactsToGameplayVolumes.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "UObject/Interface.h"
7#include "ReactsToGameplayVolumes.generated.h"
8
10
11DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FSoftBoundaryEvent, class AActor*, ActorInstigator, ASoftBoundaryVolume*, TargetSoftBoundary);
12
13UINTERFACE(Blueprintable)
14class UReactsToGameplayVolumes : public UInterface
15{
16 GENERATED_BODY()
17};
18
19class PROJECTX_API IReactsToGameplayVolumes
20{
21 GENERATED_BODY()
22
23public:
24 FSoftBoundaryEvent SoftBoundaryEvent;
25
26public:
27 UFUNCTION(BlueprintImplementableEvent, Category="Inside/Outside Events")
28 void OnInside();
29 UFUNCTION(BlueprintImplementableEvent, Category = "Inside/Outside Events")
30 void OnOutside();
31 UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Inside/Outside Events")
32 bool IsInside() const;
33 UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category = "Inside/Outside Events")
34 bool WasInside() const;
35 UFUNCTION()
36 virtual void SetInsideVolume() {}
37 UFUNCTION()
38 virtual void SetOutsideVolume() {}
39
40 /* Returns the delegate to bind events to when this actor enters a Soft Boundary Volume */
41 UFUNCTION(Category = "SoftBoundary Events")
42 virtual FSoftBoundaryEvent& GetOnSoftBoundaryEnterEvent() { return SoftBoundaryEvent; }
43
44};
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FSoftBoundaryEvent, class AActor *, ActorInstigator, ASoftBoundaryVolume *, TargetSoftBoundary)
Definition: SoftBoundaryVolume.h:19
Definition: ReactsToGameplayVolumes.h:20
FSoftBoundaryEvent SoftBoundaryEvent
Definition: ReactsToGameplayVolumes.h:24
Definition: ReactsToGameplayVolumes.h:15