-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInteractionInterface.h
More file actions
53 lines (40 loc) · 1.46 KB
/
InteractionInterface.h
File metadata and controls
53 lines (40 loc) · 1.46 KB
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
// ©2023 JDSherbert. All Rights Reserved.
#pragma once
#include <Runtime/Core/Public/CoreMinimal.h>
#include <Runtime/CoreUObject/Public/UObject/Interface.h>
#include "InteractionInterface.generated.h"
/* ---------------------------- Forward Declarations ----------------------------- */
class UInteractableComponent;
class UInteractorComponent;
/* ------------------------------ Class Definition ------------------------------- */
/**
* Interactable Interface Class. Receives calls from an Interactor Component.
* Define custom behaviour in the inherited interface's "Interact" method.
* @since 20/01/2023
* @author JDSherbert
*/
UINTERFACE(MinimalAPI)
class UInteractionInterface : public UInterface
{
GENERATED_BODY()
};
/* ---------------------------- Interface Definition ----------------------------- */
/**
* Interactable Component Interface. Receives calls from an Interactor Component.
* Define custom behaviour in the inherited interface's "Interact" method.
* @since 20/01/2023
* @author JDSherbert
*/
class SHERBERT_API IInteractionInterface
{
GENERATED_BODY()
public:
/**
* Interaction method. Should be called only by an Interactor Component when the input action is pressed, once.
* @param Instigator : The interactor component that is interacting with this object.
* @since 27/01/2023
* @author JDSherbert
*/
virtual void Interact(UInteractorComponent* Instigator) = 0;
};
/* ------------------------------------------------------------------------------- */