Rework interaction system

This commit is contained in:
koritsa
2026-05-28 21:53:34 +03:00
committed by koritsa
parent 372516c535
commit 97936ae495
26 changed files with 496 additions and 216 deletions
@@ -0,0 +1,43 @@
#pragma once
#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "Interactable.generated.h"
class ANakedDesireCharacter;
UINTERFACE(MinimalAPI, BlueprintType)
class UInteractable : public UInterface
{
GENERATED_BODY()
};
class NAKEDDESIRE_API IInteractable
{
GENERATED_BODY()
public:
// Returns true if this actor can currently be interacted with by the given player
UFUNCTION(BlueprintNativeEvent)
bool CanInteract(ANakedDesireCharacter* Player) const;
// Executes the interaction (called server-side)
UFUNCTION(BlueprintNativeEvent)
void Interact(ANakedDesireCharacter* Player);
// Text shown in the interaction prompt UI
UFUNCTION(BlueprintNativeEvent)
FText GetInteractionPrompt() const;
// Called (client-side) when this actor enters the player's proximity radius
UFUNCTION(BlueprintNativeEvent)
void ShowInteractionProximityHint();
// Called (client-side) when this actor becomes the focused interaction target
UFUNCTION(BlueprintNativeEvent)
void ShowInteractionFocusHint();
// Called (client-side) when this actor loses proximity or focus
UFUNCTION(BlueprintNativeEvent)
void HideInteractionHint();
};