第一次提交

This commit is contained in:
不明不惑
2026-03-03 01:23:02 +08:00
commit 3e434877e8
1053 changed files with 102411 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GCMS_CameraMode.h"
#include "UObject/Object.h"
#include "GCMS_CameraModeStack.generated.h"
/**
* UGCMS_CameraModeStack
*
* Stack used for blending camera modes.
*/
UCLASS()
class GENERICCAMERASYSTEM_API UGCMS_CameraModeStack : public UObject
{
GENERATED_BODY()
public:
UGCMS_CameraModeStack();
void ActivateStack();
void DeactivateStack();
bool IsStackActivate() const { return bIsActive; }
void PushCameraMode(TSubclassOf<UGCMS_CameraMode> CameraModeClass);
void PopCameraMode(TSubclassOf<UGCMS_CameraMode> CameraModeClass);
bool EvaluateStack(float DeltaTime, FGCMS_CameraModeView& OutCameraModeView);
void DrawDebug(UCanvas* Canvas) const;
// Gets the tag associated with the top layer and the blend weight of it
void GetBlendInfo(float& OutWeightOfTopLayer, FGameplayTag& OutTagOfTopLayer) const;
protected:
/**
* Get or create new camera mode.
*/
UGCMS_CameraMode* GetCameraModeInstance(TSubclassOf<UGCMS_CameraMode> CameraModeClass);
void UpdateStack(float DeltaTime);
void BlendStack(FGCMS_CameraModeView& OutCameraModeView) const;
protected:
bool bIsActive;
/**
* Cached camera mode instance pool.
*/
UPROPERTY()
TArray<TObjectPtr<UGCMS_CameraMode>> CameraModeInstances;
/**
* The list of active camera mode.
*/
UPROPERTY()
TArray<TObjectPtr<UGCMS_CameraMode>> CameraModeStack;
};