* Added Initialize System
This commit is contained in:
parent
bf2e27bd0a
commit
5ca56f96ae
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
/Engine=C:/Program Files/Epic Games/UE_5.4/Engine/Shaders
|
||||
/ShaderAutogen=H:/Projects/OLS/Intermediate/ShaderAutogen
|
||||
/Plugin/FX/Niagara=C:/Program Files/Epic Games/UE_5.4/Engine/Plugins/FX/Niagara/Shaders
|
||||
/Plugin/ExrReaderShaders=C:/Program Files/Epic Games/UE_5.4/Engine/Plugins/Media/ImgMedia/Shaders
|
||||
/Plugin/WmfMedia=C:/Program Files/Epic Games/UE_5.4/Engine/Plugins/Media/WmfMedia/Shaders
|
||||
/Plugin/FX/Niagara=C:/Program Files/Epic Games/UE_5.4/Engine/Plugins/FX/Niagara/Shaders
|
||||
/Plugin/GLTFExporter=C:/Program Files/Epic Games/UE_5.4/Engine/Plugins/Enterprise/GLTFExporter/Shaders
|
||||
/Plugin/Experimental/ChaosNiagara=C:/Program Files/Epic Games/UE_5.4/Engine/Plugins/Experimental/ChaosNiagara/Shaders
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 53 KiB |
File diff suppressed because it is too large
Load Diff
@ -23,13 +23,20 @@ void UOLSLocomotionComponent::PostInitProperties()
|
||||
Gaits.Add(EOLSGait::ESprint, 0.f);
|
||||
}
|
||||
|
||||
// Called when the game starts
|
||||
void UOLSLocomotionComponent::BeginPlay()
|
||||
// Called every frame
|
||||
void UOLSLocomotionComponent::TickComponent(float deltaTime, ELevelTick tickType,
|
||||
FActorComponentTickFunction* thisTickFunction)
|
||||
{
|
||||
Super::BeginPlay();
|
||||
Super::TickComponent(deltaTime, tickType, thisTickFunction);
|
||||
|
||||
// ...
|
||||
|
||||
UpdateEssentialValues(deltaTime);
|
||||
UpdateGait(deltaTime);
|
||||
}
|
||||
|
||||
void UOLSLocomotionComponent::Initialize()
|
||||
{
|
||||
if (const TObjectPtr<APawn> owningPawn = Cast<APawn>(GetOwner()))
|
||||
{
|
||||
OwningPawn = owningPawn;
|
||||
@ -48,18 +55,6 @@ void UOLSLocomotionComponent::BeginPlay()
|
||||
SetRotationMode(DesiredRotationMode, true);
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
void UOLSLocomotionComponent::TickComponent(float deltaTime, ELevelTick tickType,
|
||||
FActorComponentTickFunction* thisTickFunction)
|
||||
{
|
||||
Super::TickComponent(deltaTime, tickType, thisTickFunction);
|
||||
|
||||
// ...
|
||||
|
||||
UpdateEssentialValues(deltaTime);
|
||||
UpdateGait(deltaTime);
|
||||
}
|
||||
|
||||
EOLSGait UOLSLocomotionComponent::GetAllowedGait() const
|
||||
{
|
||||
if (Stance == EOLSStance::EStanding)
|
||||
|
@ -24,10 +24,13 @@ protected:
|
||||
|
||||
//~ UActorComponent BEGIN
|
||||
virtual void PostInitProperties() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void TickComponent(float deltaTime, ELevelTick tickType,
|
||||
FActorComponentTickFunction* thisTickFunction) override;
|
||||
//~ UActorComponent END
|
||||
|
||||
public:
|
||||
|
||||
virtual void Initialize();
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -28,7 +28,17 @@ void AOLSCharacter::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
LocomotionComponent->GetOnRotationModeChangedNativeDelegate().AddUObject(this, &ThisClass::OnRotationModeChanged);
|
||||
InitializeSystems();
|
||||
}
|
||||
|
||||
void AOLSCharacter::InitializeSystems()
|
||||
{
|
||||
if (LocomotionComponent)
|
||||
{
|
||||
LocomotionComponent->GetOnRotationModeChangedNativeDelegate().AddUObject(this, &ThisClass::OnRotationModeChanged);
|
||||
|
||||
LocomotionComponent->Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
|
@ -26,6 +26,8 @@ protected:
|
||||
// Called when the game starts or when spawned
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
virtual void InitializeSystems();
|
||||
|
||||
public:
|
||||
|
||||
// Called every frame
|
||||
|
Loading…
Reference in New Issue
Block a user