OLS/Source/ols/Public/Camera/Components/OLSUICameraManagerComponent.h

38 lines
1.1 KiB
C
Raw Normal View History

// © 2024 Long Ly. All rights reserved. Any unauthorized use, reproduction, or distribution of this trademark is strictly prohibited and may result in legal action.
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "OLSUICameraManagerComponent.generated.h"
UCLASS( Transient, Within=OLSPlayerCameraManager )
class UOLSUICameraManagerComponent : public UActorComponent
{
GENERATED_BODY()
public:
static class UOLSUICameraManagerComponent* GetComponent(APlayerController* playerController);
public:
UOLSUICameraManagerComponent();
bool IsSettingViewTarget() const;
AActor* GetViewTarget() const;
void SetViewTarget(AActor* viewTarget, FViewTargetTransitionParams transitionParams = FViewTargetTransitionParams());
bool NeedsToUpdateViewTarget() const;
void UpdateViewTarget(struct FTViewTarget& outVT, float deltaTime);
void OnShowDebugInfo(AHUD* hud, UCanvas* canvas, const FDebugDisplayInfo& displayInfo, float& yl, float& yPos);
private:
UPROPERTY()
TObjectPtr<class AActor> ViewTarget = nullptr;;
UPROPERTY(Transient)
bool bShouldUpdatingViewTarget = false;
};