155 lines
4.5 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameplayTagContainer.h"
#include "PawnWithSkill.h"
#include "UObject/Object.h"
#include "Definations.generated.h"
UENUM(BlueprintType)
enum class ESkillEffectType: uint8
{
Damage UMETA(DisplayName = "拉力", ToolTip = "对对方耐力造成损耗"),
Heal UMETA(DisplayName = "恢复", ToolTip = "对我方耐力进行恢复"),
ModifyCooldown UMETA(DisplayName = "技能冷却修改", ToolTip = "使技能冷却时间修改"),
Charge UMETA(DisplayName = "充能", ToolTip = "使技能的冷却进度加快"),
ModifySpeed UMETA(DisplayName = "速度修改", ToolTip = "使技能冷却进度倍率进展 持续指定时间"),
SkillEnduranceRestore UMETA(DisplayName = "技能耐久度恢复", ToolTip = "使技能耐久度恢复"),
};
//技能对象类型
UENUM(BlueprintType)
enum class ESkillTargetType: uint8
{
Self UMETA(DisplayName = "自身"),
Other UMETA(DisplayName = "对方"),
AdjacentLeft UMETA(DisplayName = "左侧相邻"),
AdjacentRight UMETA(DisplayName = "右侧相邻"),
AllLeft UMETA(DisplayName = "左侧全部"),
AllRight UMETA(DisplayName = "右侧全部"),
};
//随机对象类型
UENUM(BlueprintType)
enum class ERandomTargetType: uint8
{
AllSelf UMETA(DisplayName = "我方全部"),
AllOther UMETA(DisplayName = "敌方全部"),
};
//技能选择器类型
UENUM(BlueprintType)
enum class ETargetSelecterType: uint8
{
SkillPos UMETA(DisplayName = "根据技能位置选择"),
SkillTag UMETA(DisplayName = "根据技能Tag选择"),
RandomScope UMETA(DisplayName = "随机范围选择"),
};
USTRUCT(BlueprintType)
struct FSkillContext
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "敌人"))
class USkillManager* SkillManager;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "自身"))
APawnWithSkill* Self;
};
//技能选择器
USTRUCT(BlueprintType)
struct FSkillTargetSelector
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能选择器类型"))
ETargetSelecterType SelecterType;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能目标类型",
EditConditionHides, EditCondition = "SelecterType == ETargetSelecterType::SkillPos"))
ESkillTargetType TargetType;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "应用的技能tag",
EditConditionHides, EditCondition = "SelecterType == ETargetSelecterType::SkillTag"))
FGameplayTagContainer ApplySkillTags;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "随机目标类型"
, EditConditionHides, EditCondition = "SelecterType == ETargetSelecterType::RandomScope"))
ERandomTargetType RandomType;
};
//技能效果
USTRUCT(BlueprintType)
struct FSkillEffectData
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能类型"))
ESkillEffectType EffectType;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能值"))
float EffectValue;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能配置补充,不需要为空"))
FString ParamAddition;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能选择器"))
FSkillTargetSelector SkillSelecter;
};
USTRUCT(BlueprintType)
struct FSkillData: public FTableRowBase
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能名称"))
FText SkillName;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta = (AllowedClasses = "Texture2D", ToolTip = "技能图片"))
FSoftObjectPath SkillTexture;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能CD"))
float CD;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能CD速度"))
float Speed = 1.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能耐久度"))
int32 Endurance;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能Tag"))
FGameplayTag SkillTag;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "背包占用"))
int32 WeightLimit;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ToolTip = "技能效果组"))
TArray<FSkillEffectData> SkillEffects;
};
USTRUCT(BlueprintType)
struct FSkillDataConfig
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (RowType = "FSkillData"))
UDataTable* DataTable;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
FName SkillRowName;
};
/**
*
*/
UCLASS()
class PROJECTFISH_API UDefinations : public UObject
{
GENERATED_BODY()
};