Skip to content
Snippets Groups Projects
Select Git revision
  • bf84c43c4117615af2178e076b2010f73ddc39e1
  • master default protected
2 results

lab1.tf

Blame
  • Forked from Sebastian Rieger / cloud-computing-msc-ai-examples
    Source project has a limited visibility.
    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();
    };