Implemented LookAtDetectorBase
This commit is contained in:
67
Source/Integration/LookAtDetector.h
Normal file
67
Source/Integration/LookAtDetector.h
Normal file
@@ -0,0 +1,67 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Runtime/Engine/Classes/GameFramework/PlayerController.h"
|
||||
#include "LookAtDetector.generated.h"
|
||||
|
||||
class AIntegrationGameModeBase;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class INTEGRATION_API UlxLookAtActorBase : public UObject
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
UlxLookAtActorBase();
|
||||
~UlxLookAtActorBase() {};
|
||||
|
||||
// Used by the IntegrationGameModeBase to trigger recalculation.
|
||||
UFUNCTION(BlueprintCallable, Category = "Luprex")
|
||||
void Update();
|
||||
|
||||
// Used in blueprints to set the result object.
|
||||
UFUNCTION(BlueprintCallable, Category = "Luprex")
|
||||
void SetSelectedActor(AActor *actor) { CurrentSelectedActor = actor; }
|
||||
|
||||
// Used to find out if the selection recently changed.
|
||||
UFUNCTION(BlueprintCallable, Category = "Luprex")
|
||||
bool SelectionChanged() { return (PreviousSelectedActor != CurrentSelectedActor); }
|
||||
|
||||
// Defined in blueprints to do the actual recalculation.
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = "Luprex")
|
||||
void Recalculate();
|
||||
|
||||
public:
|
||||
|
||||
|
||||
public:
|
||||
// A pointer to an IntegrationGameModeBase.
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
AIntegrationGameModeBase *GameMode;
|
||||
|
||||
// A pointer to an actor, the current character.
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
AActor *Player;
|
||||
|
||||
// A pointer to the player controller.
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
APlayerController *PlayerController;
|
||||
|
||||
// A pointer to the camera manager.
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
APlayerCameraManager *CameraManager;
|
||||
|
||||
// The selected actor on the previous frame.
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
AActor *PreviousSelectedActor;
|
||||
|
||||
// The selected actor on the current frame.
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
AActor *CurrentSelectedActor;
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user