5#include "CoreMinimal.h"
7#include "GameFramework/PlayerState.h"
8#include "UObject/Interface.h"
9#include "Kismet/GameplayStatics.h"
10#include "OwnedInterface.generated.h"
13UINTERFACE(meta=(CannotImplementInterfaceInBlueprint))
16 GENERATED_UINTERFACE_BODY()
21 GENERATED_IINTERFACE_BODY()
27 return Cast<T>(GetOwnedPlayerState());
30 UFUNCTION(BlueprintCallable, Category = PlayerOwnedInterface)
31 virtual APlayerState* GetOwnedPlayerState()
const;
36 return Cast<T>(GetOwningController());
40 UFUNCTION(BlueprintCallable, Category = PlayerOwnedInterface)
41 virtual AController* GetOwningController()
const;
44 virtual
void OnOwnerLeave() {}
46 virtual
void OnOwnerDied() {}
56 static void GetPlayerOwnedActorList(
const UObject* WorldContextObject, TArray<IOwnedInterface*>& ActorList);
59 UFUNCTION(BlueprintPure, Category = PlayerOwnedInterface)
60 static APlayerState* GetPlayerStateFromActor(
const AActor* Actor);
Definition: OwnedInterface.h:20
T * GetOwningController() const
Definition: OwnedInterface.h:34
T * GetOwnedPlayerState() const
Definition: OwnedInterface.h:25
Definition: OwnedInterface.h:51
Definition: OwnedInterface.h:15