Automatically go to a followup state when curr state ends
This commit is contained in:
parent
ea8e26e77d
commit
50a3bd8a4b
@ -163,7 +163,15 @@ 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
|
// 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
|
// to rethink the way we handle logic for ending a state and which class is in charge of handling
|
||||||
// what
|
// what
|
||||||
|
if(FollowupState != NAME_None)
|
||||||
|
{
|
||||||
|
InStateContext.Parent->GoToState(FollowupState, StateFinishReason);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
InStateContext.Parent->GoToEntryState(StateFinishReason);
|
InStateContext.Parent->GoToEntryState(StateFinishReason);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,6 +126,13 @@ public:
|
|||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UFF State Properties")
|
||||||
bool bCanTransitionToSelf = false;
|
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
|
* Animation to begin playing when this state is entered
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user