2023-06-03 22:38:35 +00:00
|
|
|
// Unreal Fighting Engine by Kevin Poretti
|
2023-06-03 18:37:14 +00:00
|
|
|
|
|
|
|
#include "FEState.h"
|
2023-06-05 20:17:36 +00:00
|
|
|
|
|
|
|
// FE includes
|
2023-06-03 22:38:35 +00:00
|
|
|
#include "FEStateMachineComponent.h"
|
|
|
|
|
|
|
|
|
|
|
|
void UFEState::InitActorInfo(AActor* InOwner, AActor* InAvatar)
|
|
|
|
{
|
|
|
|
Owner = InOwner;
|
|
|
|
Avatar = InAvatar;
|
|
|
|
}
|
|
|
|
|
|
|
|
void UFEState::Enter()
|
|
|
|
{
|
|
|
|
TicksInState = 0;
|
|
|
|
|
|
|
|
OnEnter();
|
|
|
|
}
|
|
|
|
|
|
|
|
void UFEState::Exit()
|
|
|
|
{
|
|
|
|
OnExit();
|
|
|
|
}
|
|
|
|
|
|
|
|
void UFEState::FixedTick(float OneFrame)
|
|
|
|
{
|
|
|
|
TicksInState++;
|
|
|
|
|
|
|
|
OnFixedTick(OneFrame);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UFEState::OnEnter_Implementation()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UFEState::OnExit_Implementation()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UFEState::OnFixedTick_Implementation(float OneFrame)
|
|
|
|
{
|
|
|
|
}
|
2023-06-03 18:37:14 +00:00
|
|
|
|
2023-06-03 22:38:35 +00:00
|
|
|
UWorld* UFEState::GetWorld() const
|
|
|
|
{
|
|
|
|
UFEStateMachineComponent* SMC = Cast<UFEStateMachineComponent>(GetOuter());
|
|
|
|
if(SMC)
|
|
|
|
{
|
|
|
|
return SMC->GetWorld();
|
|
|
|
}
|
|
|
|
|
|
|
|
return nullptr;
|
|
|
|
}
|