Files
PHY/Source/PHY/Private/Gameplay/PHYGameInstance.h
2026-03-05 01:34:47 +08:00

49 lines
1.5 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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; }
};