57 lines
746 B
C++
57 lines
746 B
C++
// Unreal Fighting Engine by Kevin Poretti
|
|
|
|
#include "FEState.h"
|
|
#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)
|
|
{
|
|
}
|
|
|
|
UWorld* UFEState::GetWorld() const
|
|
{
|
|
UFEStateMachineComponent* SMC = Cast<UFEStateMachineComponent>(GetOuter());
|
|
if(SMC)
|
|
{
|
|
return SMC->GetWorld();
|
|
}
|
|
|
|
return nullptr;
|
|
}
|