Automatically go to a followup state when curr state ends
This commit is contained in:
parent
ea8e26e77d
commit
50a3bd8a4b
@ -163,9 +163,17 @@ void UFFState::Finish(const FFFStateContext& InStateContext, EFFStateFinishReaso
|
||||
// the appropriate flags are set. I think having this state finish reason is good but I may want
|
||||
// to rethink the way we handle logic for ending a state and which class is in charge of handling
|
||||
// what
|
||||
if(FollowupState != NAME_None)
|
||||
{
|
||||
InStateContext.Parent->GoToState(FollowupState, StateFinishReason);
|
||||
}
|
||||
else
|
||||
{
|
||||
InStateContext.Parent->GoToEntryState(StateFinishReason);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void UFFState::RegisterInputHandler(const FFFInputSequence& InRequiredSequence, FFFInputEventDelegate InDelegate)
|
||||
{
|
||||
|
@ -126,6 +126,13 @@ public:
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties")
|
||||
bool bCanTransitionToSelf = false;
|
||||
|
||||
/**
|
||||
* State to transition to when this state is finished. If left blank then the entry state
|
||||
* of the state machine will be transitioned into.
|
||||
*/
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties")
|
||||
FName FollowupState = NAME_None;
|
||||
|
||||
/**
|
||||
* Animation to begin playing when this state is entered
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user