* 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
|
/Engine=C:/Program Files/Epic Games/UE_5.4/Engine/Shaders
|
||||||
/ShaderAutogen=H:/Projects/OLS/Intermediate/ShaderAutogen
|
/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/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/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/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
|
/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);
|
Gaits.Add(EOLSGait::ESprint, 0.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the game starts
|
// Called every frame
|
||||||
void UOLSLocomotionComponent::BeginPlay()
|
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()))
|
if (const TObjectPtr<APawn> owningPawn = Cast<APawn>(GetOwner()))
|
||||||
{
|
{
|
||||||
OwningPawn = owningPawn;
|
OwningPawn = owningPawn;
|
||||||
@ -48,18 +55,6 @@ void UOLSLocomotionComponent::BeginPlay()
|
|||||||
SetRotationMode(DesiredRotationMode, true);
|
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
|
EOLSGait UOLSLocomotionComponent::GetAllowedGait() const
|
||||||
{
|
{
|
||||||
if (Stance == EOLSStance::EStanding)
|
if (Stance == EOLSStance::EStanding)
|
||||||
|
@ -24,11 +24,14 @@ protected:
|
|||||||
|
|
||||||
//~ UActorComponent BEGIN
|
//~ UActorComponent BEGIN
|
||||||
virtual void PostInitProperties() override;
|
virtual void PostInitProperties() override;
|
||||||
virtual void BeginPlay() override;
|
|
||||||
virtual void TickComponent(float deltaTime, ELevelTick tickType,
|
virtual void TickComponent(float deltaTime, ELevelTick tickType,
|
||||||
FActorComponentTickFunction* thisTickFunction) override;
|
FActorComponentTickFunction* thisTickFunction) override;
|
||||||
//~ UActorComponent END
|
//~ UActorComponent END
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
virtual void Initialize();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
EOLSGait GetAllowedGait() const;
|
EOLSGait GetAllowedGait() const;
|
||||||
|
@ -28,7 +28,17 @@ void AOLSCharacter::BeginPlay()
|
|||||||
{
|
{
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
InitializeSystems();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AOLSCharacter::InitializeSystems()
|
||||||
|
{
|
||||||
|
if (LocomotionComponent)
|
||||||
|
{
|
||||||
LocomotionComponent->GetOnRotationModeChangedNativeDelegate().AddUObject(this, &ThisClass::OnRotationModeChanged);
|
LocomotionComponent->GetOnRotationModeChangedNativeDelegate().AddUObject(this, &ThisClass::OnRotationModeChanged);
|
||||||
|
|
||||||
|
LocomotionComponent->Initialize();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called every frame
|
// Called every frame
|
||||||
|
@ -26,6 +26,8 @@ protected:
|
|||||||
// Called when the game starts or when spawned
|
// Called when the game starts or when spawned
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
virtual void InitializeSystems();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Called every frame
|
// Called every frame
|
||||||
|
Loading…
Reference in New Issue
Block a user