Partway done with refactor to lx Player Controller
This commit is contained in:
46
Source/Integration/PlayerControllerBase.h
Normal file
46
Source/Integration/PlayerControllerBase.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Engine/HitResult.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "PlayerControllerBase.generated.h"
|
||||
|
||||
UCLASS(BlueprintType, Blueprintable)
|
||||
class INTEGRATION_API AlxPlayerControllerBase : public APlayerController
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "Context"), Category = "Luprex|Look-At Detection")
|
||||
static void SetLookAt(const UObject *Context, const FHitResult &HitResult);
|
||||
|
||||
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"), Category = "Luprex|Look-At Detection")
|
||||
static const FHitResult &GetLookAt(const UObject *Context);
|
||||
|
||||
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"), Category = "Luprex|Look-At Detection")
|
||||
static const AActor *GetLookAtActor(const UObject *Context);
|
||||
|
||||
UFUNCTION(BlueprintPure, meta = (WorldContext = "Context"), Category = "Luprex|Look-At Detection")
|
||||
static FVector2D GetLookAtPixel(const UObject *Context);
|
||||
|
||||
UFUNCTION(BlueprintCallable, meta = (WorldContext = "Context"), Category = "Luprex|Look-At Detection")
|
||||
static void SetLookAtChanged(const UObject *Context);
|
||||
|
||||
// Blueprint events
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = "Luprex|Look-At Detection")
|
||||
void CalculateLookAt();
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = "Luprex|Look-At Detection")
|
||||
void LookAtChanged();
|
||||
|
||||
// Called by GameMode each tick.
|
||||
void UpdateLookAt();
|
||||
|
||||
// Get the player controller, cast to AlxPlayerControllerBase.
|
||||
static AlxPlayerControllerBase *FromContext(const UObject *Context);
|
||||
|
||||
UPROPERTY()
|
||||
FHitResult CurrentLookAt;
|
||||
|
||||
bool MustCallLookAtChanged = false;
|
||||
};
|
||||
Reference in New Issue
Block a user