49 lines
1.5 KiB
C++
49 lines
1.5 KiB
C++
// Copyright 2025 PHY. All Rights Reserved.
|
||
|
||
#pragma once
|
||
|
||
#include "CoreMinimal.h"
|
||
#include "GameplayTagContainer.h"
|
||
#include "Engine/GameInstance.h"
|
||
#include "PHYGameInstance.generated.h"
|
||
|
||
class UIKRetargeter;
|
||
class UPHYClassDefaults;
|
||
class UPHYUIIconSet;
|
||
/**
|
||
*
|
||
*/
|
||
USTRUCT(BlueprintType)
|
||
struct FRetargetInfo
|
||
{
|
||
GENERATED_BODY()
|
||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "PHY|Retargeter")
|
||
TSoftObjectPtr<UIKRetargeter> Retargeter;
|
||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "PHY|Retargeter")
|
||
TSoftObjectPtr<USkeletalMesh> Mesh;
|
||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "PHY|Retargeter")
|
||
bool bMale = false;
|
||
};
|
||
|
||
UCLASS()
|
||
class PHY_API UPHYGameInstance : public UGameInstance
|
||
{
|
||
GENERATED_BODY()
|
||
UPROPERTY(EditAnywhere, Category = "Config|Character",meta=(Categories = "Targeter"))
|
||
TMap<FGameplayTag,FRetargetInfo> Retargeters;
|
||
|
||
/** 全局职业/门派默认四维配置 */
|
||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Config|Attributes", meta=(AllowPrivateAccess=true))
|
||
TObjectPtr<UPHYClassDefaults> ClassDefaults;
|
||
|
||
/** 全局UI固定图标集合(经验/升级等) */
|
||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Config|UI", meta=(AllowPrivateAccess=true))
|
||
TObjectPtr<UPHYUIIconSet> UIIconSet;
|
||
|
||
public:
|
||
TOptional<FRetargetInfo> GetRetargetInfo(const FGameplayTag& RetargetInfoTag) const;
|
||
const UPHYClassDefaults* GetClassDefaults() const { return ClassDefaults; }
|
||
const UPHYUIIconSet* GetUIIconSet() const { return UIIconSet; }
|
||
|
||
};
|