haxis/Source/UnrealProject/Abilities/IngameSkillTree.h

45 lines
1.1 KiB
C++

#pragma once
#include "SkillTreeState.h"
#include "IngameSkillTree.Generated.h"
USTRUCT()
struct FIngameSkillTreeSkill
{
GENERATED_BODY()
public:
UPROPERTY()
TArray<FIntPoint> placedPoints;
UPROPERTY(BlueprintReadOnly)
class UBaseSkillObject* skillObject;
UPROPERTY(BlueprintReadOnly)
class UAbilityInfo* selectedEffect;
UPROPERTY(BlueprintReadOnly)
int32 selectedEffectIndex;
UPROPERTY(BlueprintReadOnly)
float power;
UPROPERTY(BlueprintReadOnly)
int32 level;
// Kind of ability on the button bar
UPROPERTY(BlueprintReadOnly)
int32 abilityType;
};
UCLASS()
class AIngameSkillTree : public AActor
{
GENERATED_BODY()
public:
AIngameSkillTree(const FObjectInitializer& init);
~AIngameSkillTree();
virtual void BeginPlay() override;
void BuildFromState(const FSkillTreeState& state);
TArray<FIngameSkillTreeSkill> GetSkillsForLevel(class ADefaultPlayerState* player);
TArray<FIngameSkillTreeSkill> GetSkillsForLevel(float level);
void UpdatePowerForSkill(FIngameSkillTreeSkill& skill, float level);
private:
UPROPERTY()
TArray<FIngameSkillTreeSkill> m_skills;
};