Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
TargetableInterface.h
이 파일의 문서화 페이지로 가기
1// Fill out your copyright notice in the Description page of Project Settings.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "UObject/Interface.h"
7#include "TargetableInterface.generated.h"
8
9// This class does not need to be modified.
10UINTERFACE(Blueprintable, BlueprintType)
11class UTargetableInterface : public UInterface
12{
13 GENERATED_BODY()
14};
15
19class CK_UE_API ITargetableInterface
20{
21 GENERATED_BODY()
22
23public:
24 template <typename T>
25 static ITargetableInterface* From(TObjectPtr<T> Object);
26 static ITargetableInterface* From(UObject* Object);
27 static UObject* AsObject(ITargetableInterface* Interface);
28 static AActor* AsActor(ITargetableInterface* Interface);
29
30public:
31 virtual void ShowLockOnMarker() = 0;
32 virtual void HideLockOnMarker() = 0;
33 virtual void ShowTargetingMarker(float MarkerAlpha);
34 virtual void HideTargetingMarker();
35
36 virtual bool IsTargetable() const = 0;
37 virtual bool IsTargeted();
38
39 virtual void SetPrevent(bool bPrevent);
40 virtual bool IsPrevented() const;
41
42 virtual FVector GetTargetedActorLocation();
43 virtual FRotator GetTargetedActionRotation();
44
45 virtual bool IsTargetValid() const;
46
47private:
48 bool bLockOnPrevented = false;
49};
50
51
52template <typename T>
54{
55 return From(Object.Get());
56}
Definition TargetableInterface.h:20
virtual bool IsTargetable() const =0
virtual void HideLockOnMarker()=0
virtual void ShowLockOnMarker()=0
static ITargetableInterface * From(TObjectPtr< T > Object)
Definition TargetableInterface.h:53
Definition TargetableInterface.h:12