refactor: change file name
This commit is contained in:
		
							
								
								
									
										64
									
								
								Source/UTAD_UI/SkillTree/SkillTreeSubsystem.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								Source/UTAD_UI/SkillTree/SkillTreeSubsystem.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,64 @@ | ||||
| #pragma once | ||||
|  | ||||
| #include "CoreMinimal.h" | ||||
| #include "Subsystems/GameInstanceSubsystem.h" | ||||
| #include "SkillTreeTypes.h" | ||||
| #include "SkillTreeSubsystem.generated.h" | ||||
|  | ||||
| // Forward declarations | ||||
| class USkillTreeComponent; | ||||
|  | ||||
| UCLASS() | ||||
| class UTAD_UI_API USkillTreeSubsystem : public UGameInstanceSubsystem | ||||
| { | ||||
|     GENERATED_BODY() | ||||
|  | ||||
| public: | ||||
|     // Subsystem interface | ||||
|     virtual void Initialize(FSubsystemCollectionBase& Collection) override; | ||||
|     virtual void Deinitialize() override; | ||||
|  | ||||
|     // Get the singleton instance | ||||
|     UFUNCTION(BlueprintPure, Category = "Skill Tree", meta = (DisplayName = "Get Skill Tree Manager")) | ||||
|     static USkillTreeSubsystem* GetSkillTreeManager(const UObject* WorldContextObject); | ||||
|  | ||||
|     // Register and unregister player skill tree components | ||||
|     UFUNCTION(BlueprintCallable, Category = "Skill Tree") | ||||
|     void RegisterPlayerSkillTree(USkillTreeComponent* SkillTreeComponent); | ||||
|  | ||||
|     UFUNCTION(BlueprintCallable, Category = "Skill Tree") | ||||
|     void UnregisterPlayerSkillTree(); | ||||
|  | ||||
|     // Get the player's skill tree component | ||||
|     UFUNCTION(BlueprintPure, Category = "Skill Tree") | ||||
|     USkillTreeComponent* GetPlayerSkillTree() const { return PlayerSkillTreeComponent; } | ||||
|  | ||||
|     // Global skill tree settings | ||||
|     UFUNCTION(BlueprintPure, Category = "Skill Tree Settings") | ||||
|     int32 GetMaxSkillPoints() const { return MaxSkillPoints; } | ||||
|  | ||||
|     UFUNCTION(BlueprintPure, Category = "Skill Tree Settings") | ||||
|     int32 GetSkillPointsPerLevel() const { return SkillPointsPerLevel; } | ||||
|  | ||||
|     UFUNCTION(BlueprintPure, Category = "Skill Tree Settings") | ||||
|     int32 GetRespecCost() const { return RespecCost; } | ||||
|  | ||||
| protected: | ||||
|     // Reference to the player's skill tree component | ||||
|     UPROPERTY() | ||||
|     USkillTreeComponent* PlayerSkillTreeComponent; | ||||
|  | ||||
|     // Global settings | ||||
|     UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings") | ||||
|     int32 MaxSkillPoints = 100; | ||||
|  | ||||
|     UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings") | ||||
|     int32 SkillPointsPerLevel = 1; | ||||
|  | ||||
|     UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings") | ||||
|     int32 RespecCost = 100;  // Cost in gold/currency to reset skills | ||||
|  | ||||
|     // Data table for skills (can be overridden in Blueprint) | ||||
|     UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Settings") | ||||
|     class UDataTable* DefaultSkillDataTable; | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user