Files
PHY/Plugins/GCS/Source/GenericCombatSystem/Public/Combo/GCS_ComboDefinition.h
2026-03-03 01:23:02 +08:00

108 lines
3.7 KiB
C++
Raw Permalink 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 https://yuewu.dev/en All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameplayTagContainer.h"
#include "Engine/DataTable.h"
#include "StructUtils/InstancedStruct.h"
#include "GCS_ComboDefinition.generated.h"
/**
* Base struct allow you to extend the combo definition's fields using C++.
* 基础结构体允许你通过C++拓展连击定义的字段。
*/
USTRUCT(BlueprintType, meta=(Hidden))
struct GENERICCOMBATSYSTEM_API FGCS_ComboDefinitionExtension
{
GENERATED_BODY()
};
/**
*
*/
USTRUCT(BlueprintType)
struct FGCS_ComboDefinition : public FTableRowBase
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Combo")
TSoftClassPtr<class UGameplayAbility> AbilityClass;
/**
* Will reset the combo step if this row was selected.(Only works if MinComboStep > 0)
* 此行选中则会重置连招步骤。(仅在MinComboStep > 0时生效。)
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Combo")
bool bResetComboStep{false};
/**
* When Current Combo Step > this value, this won't be selected. 0 means no restriction.
* How many combo steps required to select this combo.
* 至少执行过几次combo才能选择此行作为下一个combo。0代表入口。
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Requirements", meta=(ClampMin=0))
int32 MinComboStep = 0;
/**
* The combo event data's event tag must equals to this tag if set, otherwise this combo won't be selected!.
* 若有值连击事件数据的event tag必须与此值相等否则该连击不会被选择。
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Requirements")
FGameplayTag EventTag;
/**
* The combo event data's instigator tags mush matches this Query if set, otherwise this combo won't be selected!
* 若有值连击事件数据的instigator tags必须匹配此查询否则该连击不会被选择。
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Requirements")
FGameplayTagQuery EventInstigatorTagQuery;
/**
* The tags owned by the ability system component of the pawn must much this query if set otherwise this combo won't be selected!
* 若有值Pawn的技能组件所拥有的Tags必须满足此查询否则该连击不会被选择。
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Requirements")
FGameplayTagQuery TagQuery;
/**
* Should try if this ability can be activated before select it?
* 是否在选择Ability之前测试是否可激活
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Activation")
bool bRunActivationTest{false};
/**
* Should abort the whole combo or just skip this selection when activation test failed?
* 若激活测试失败是放弃整个Combo还是跳过此选择
*/
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Activation", meta=(EditCondition="bRunActivationTest"))
bool bAbortIfActivationTestFailed{false};
/**
* Native Instanced struct for extending the combo definition.
* 实例化结构体用于扩充连击定义的字段。
* @attention For C++ users only. 仅针对C++用户。
*/
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Extension")
TInstancedStruct<FGCS_ComboDefinitionExtension> NativeExtension;
/**
* Blueprint Instanced struct for extending the combo definition.
* 实例化结构体用于扩充连击定义的字段。
* @attention For blueprint users only. 仅针对蓝图用户。
*/
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Extension")
FInstancedStruct Extension;
#if WITH_EDITORONLY_DATA
/**
* Description for developers in the editor.
* 编辑器中用于开发者的描述。
*/
UPROPERTY(EditAnywhere, Category = "Editor")
FString DevDescription;
#endif
};