Change state property types so they can be edited as enums

This commit is contained in:
Kevin Poretti 2023-07-21 23:25:45 -04:00
parent afc34be554
commit c652716895
2 changed files with 7 additions and 7 deletions

View File

@ -38,7 +38,7 @@ struct FFFStateContext
* A state is an object that provides rules and conditions for when a state can be transitioned into * A state is an object that provides rules and conditions for when a state can be transitioned into
* and logic to run when the state is entered, exited, and active. * and logic to run when the state is entered, exited, and active.
*/ */
UCLASS() UCLASS(Blueprintable)
class UNREALFIGHTINGFRAMEWORK_API UFFState : public UObject class UNREALFIGHTINGFRAMEWORK_API UFFState : public UObject
{ {
GENERATED_BODY() GENERATED_BODY()
@ -62,18 +62,18 @@ public:
* crouching, standing, or airborne for this state to be eligible for transitioning. * crouching, standing, or airborne for this state to be eligible for transitioning.
*/ */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties") UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties")
uint8 StanceRequired; int32 StanceRequired;
/** /**
* What is this state's category. * What is this state's category.
* Used for determining what types of state can prematurely cancel this one. * Used for determining what types of state can prematurely cancel this one.
*/ */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties") UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties")
uint8 StateType; int32 StateType;
/** Conditions that need to be met in order for this state to be transitioned into */ /** Conditions that need to be met in order for this state to be transitioned into */
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties") UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties")
TArray<uint8> EntryConditions; TArray<int32> EntryConditions;
/** /**
* Input sequences that needs to be present in the controlling player's input buffer for this * Input sequences that needs to be present in the controlling player's input buffer for this

View File

@ -21,9 +21,9 @@ class UNREALFIGHTINGFRAMEWORK_API IFFStateAvatarInterface
GENERATED_BODY() GENERATED_BODY()
public: public:
virtual bool CheckStance(uint8 Stance) = 0; virtual bool CheckStance(int32 Stance) = 0;
virtual bool CheckStateEnabled(uint8 StateType) = 0; virtual bool CheckStateEnabled(int32 StateType) = 0;
virtual bool CheckStateEntryConditions(const TArray<uint8>& EntryConditions) = 0; virtual bool CheckStateEntryConditions(const TArray<int32>& EntryConditions) = 0;
}; };