Skip to content
Snippets Groups Projects
Select Git revision
  • 2e55aba907b4426005805c5eb88fcef2858f0774
  • master default
  • 1.1
  • 1.0
4 results

main.cpp

Blame
  • Targetable.h 1.02 KiB
    // Fill out your copyright notice in the Description page of Project Settings.
    
    #pragma once
    
    #include "CoreMinimal.h"
    #include "UObject/Object.h"
    #include "UObject/Interface.h"
    #include "Targetable.generated.h"
    
    UINTERFACE(BlueprintType)
    class DISPLAYCLUSTEREXTENSIONS_API UTargetable: public UInterface
    {
    	// has to be empty, this is Unreals syntax to make it visible in blueprints
    	GENERATED_UINTERFACE_BODY()
    };
    
    class ITargetable
    {
    	GENERATED_IINTERFACE_BODY()
    
    public:
    	// function that will be called when clickable actor got clicked, and passed the world pos of the click
    	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = Gameplay)
    	void OnTargeted(FVector WorldPositionOfTarget);
    	
    	//function that will be called when a targetable actor gets focused
    	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = Gameplay)
    	void OnTargetedEnter();
    
    	//function that will be called when a targetable actor loses focused
    	UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = Gameplay)
    	void OnTargetedLeave();
    };