From 564d0837c5177cf0208705fd65763b83b13545ee Mon Sep 17 00:00:00 2001 From: amasson Date: Thu, 25 Dec 2025 01:20:33 +0100 Subject: [PATCH] auto run --- .gitmodules | 6 + Config/DefaultEngine.ini | 2 + Config/DefaultGame.ini | 2 + Config/DefaultInput.ini | 2 +- .../Character/Player/BP_Aura.uasset | 4 +- .../Player/BP_PlayerCharacterBase.uasset | 4 +- .../Wailing/Blueprints/Game/GM_Wailing.uasset | 4 +- .../Blueprints/Player/PC_Wailing2.uasset | 3 + .../Data/Character/Kits/CK_Base.uasset | 3 + .../Kits/DT_CharacterKit_Base.uasset | 3 - .../Wailing/Input/Actions/AI_AutoRun.uasset | 3 + .../Input/Actions/AI_HoldPosition.uasset | 3 + Content/Wailing/Input/Actions/AI_Move.uasset | 3 + Content/Wailing/Input/IMC_Default.uasset | 3 + .../1/MR/A3KHXKPE3TFII5AIK14YSW.uasset | 3 + .../A/FT/C423PA7UO8F82S3S5V7A2V.uasset | 3 + Plugins/SlotBasedInventorySystem | 1 + .../Private/Components/AutoRunComponent.cpp | 106 ++++++++++++++++++ .../Private/Player/WLPlayerController.cpp | 98 ++++++++++++++++ .../Public/Components/AutoRunComponent.h | 73 ++++++++++++ .../Public/Player/WLPlayerController.h | 43 +++++++ Wailing.uproject | 4 + 22 files changed, 366 insertions(+), 10 deletions(-) create mode 100644 Content/Wailing/Blueprints/Player/PC_Wailing2.uasset create mode 100644 Content/Wailing/Data/Character/Kits/CK_Base.uasset delete mode 100644 Content/Wailing/Data/Character/Kits/DT_CharacterKit_Base.uasset create mode 100644 Content/Wailing/Input/Actions/AI_AutoRun.uasset create mode 100644 Content/Wailing/Input/Actions/AI_HoldPosition.uasset create mode 100644 Content/Wailing/Input/Actions/AI_Move.uasset create mode 100644 Content/Wailing/Input/IMC_Default.uasset create mode 100644 Content/__ExternalActors__/Wailing/Maps/Playground/Playground/1/MR/A3KHXKPE3TFII5AIK14YSW.uasset create mode 100644 Content/__ExternalActors__/Wailing/Maps/Playground/Playground/A/FT/C423PA7UO8F82S3S5V7A2V.uasset create mode 160000 Plugins/SlotBasedInventorySystem create mode 100644 Source/Wailing/Private/Components/AutoRunComponent.cpp create mode 100644 Source/Wailing/Public/Components/AutoRunComponent.h diff --git a/.gitmodules b/.gitmodules index a4f60ab..3163ca1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,9 @@ [submodule "Plugins/FactionSystem"] path = Plugins/FactionSystem url = https://github.com/amasson42/FactionSystem-unreal-plugin.git +[submodule "Plugins/InteractionSystem"] + path = Plugins/InteractionSystem + url = https://github.com/amasson42/InteractionSystem-unreal-plugin.git +[submodule "Plugins/SlotBasedInventorySystem"] + path = Plugins/SlotBasedInventorySystem + url = https://github.com/amasson42/SlotBasedInventorySystem-unreal-plugin.git diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index e0aab48..2e2a140 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -65,6 +65,8 @@ FontDPI=72 [/Script/Engine.Engine] +ActiveGameNameRedirects=(OldGameName="TP_Blank",NewGameName="/Script/Wailing") +ActiveGameNameRedirects=(OldGameName="/Script/TP_Blank",NewGameName="/Script/Wailing") +AssetManagerClassName=/Script/GasRpg.GasRpgAssetManager +bUseFixedFrameRate=True [/Script/AndroidFileServerEditor.AndroidFileServerRuntimeSettings] bEnablePlugin=True diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini index c3ecd0a..8f8bb0b 100644 --- a/Config/DefaultGame.ini +++ b/Config/DefaultGame.ini @@ -12,3 +12,5 @@ ProjectDisplayedTitle=NSLOCTEXT("[/Script/EngineSettings]", "AFE249BB43CD5968FD7 bAddPacks=True InsertPack=(PackSource="StarterContent.upack",PackName="StarterContent") +[/Script/GameplayAbilities.AbilitySystemGlobals] +AbilitySystemGlobalsClassName="/Script/GasRpg.GasRpgAbilitySystemGlobals" diff --git a/Config/DefaultInput.ini b/Config/DefaultInput.ini index 4cc3605..f36e64b 100644 --- a/Config/DefaultInput.ini +++ b/Config/DefaultInput.ini @@ -77,7 +77,7 @@ DefaultViewportMouseLockMode=LockOnCapture FOVScale=0.011110 DoubleClickTime=0.200000 DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput -DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent +DefaultInputComponentClass=/Script/GasRpg.GRInputComponent DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks -ConsoleKeys=Tilde +ConsoleKeys=Tilde diff --git a/Content/Wailing/Blueprints/Character/Player/BP_Aura.uasset b/Content/Wailing/Blueprints/Character/Player/BP_Aura.uasset index b0ef94e..ff6b999 100644 --- a/Content/Wailing/Blueprints/Character/Player/BP_Aura.uasset +++ b/Content/Wailing/Blueprints/Character/Player/BP_Aura.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f31a24fe20d8422971c5eea43082c4f6c9451efd6168068c690176a0c6f585b -size 44983 +oid sha256:d00c67aac0792369238f5ffb6b90591609fba322014e17ecc9303d9b498d08d9 +size 46353 diff --git a/Content/Wailing/Blueprints/Character/Player/BP_PlayerCharacterBase.uasset b/Content/Wailing/Blueprints/Character/Player/BP_PlayerCharacterBase.uasset index 0184631..39efd4b 100644 --- a/Content/Wailing/Blueprints/Character/Player/BP_PlayerCharacterBase.uasset +++ b/Content/Wailing/Blueprints/Character/Player/BP_PlayerCharacterBase.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:687578aa4aa0feb8e2e58186dcffbaacfc942c1e047017595aa9afb8cc717bd8 -size 26620 +oid sha256:9d3963f7c9d9db458a5e8f20f526eb38c47afe5c8bfa3e02ce9834df8fc155c8 +size 30479 diff --git a/Content/Wailing/Blueprints/Game/GM_Wailing.uasset b/Content/Wailing/Blueprints/Game/GM_Wailing.uasset index 21e43d4..f3aa06f 100644 --- a/Content/Wailing/Blueprints/Game/GM_Wailing.uasset +++ b/Content/Wailing/Blueprints/Game/GM_Wailing.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6316926d277f4c18f41a23eae39423206c0a8b153586631ba6764ac4fae07e1e -size 21682 +oid sha256:ac3f7acfc47e0e8ccae9ec02667cea3bac8e7402ca43d3c98b774b3c97ee7238 +size 21809 diff --git a/Content/Wailing/Blueprints/Player/PC_Wailing2.uasset b/Content/Wailing/Blueprints/Player/PC_Wailing2.uasset new file mode 100644 index 0000000..5997613 --- /dev/null +++ b/Content/Wailing/Blueprints/Player/PC_Wailing2.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe0d2a3d69eca93ea97c1c4780539f437e1ca9887e9b2209095c8fe9cd3b5ddc +size 63089 diff --git a/Content/Wailing/Data/Character/Kits/CK_Base.uasset b/Content/Wailing/Data/Character/Kits/CK_Base.uasset new file mode 100644 index 0000000..2ad6bd2 --- /dev/null +++ b/Content/Wailing/Data/Character/Kits/CK_Base.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4aca9c8f269af2f812028b505a69f76829c6f376481c33f65cefc0c4d284fea1 +size 1665 diff --git a/Content/Wailing/Data/Character/Kits/DT_CharacterKit_Base.uasset b/Content/Wailing/Data/Character/Kits/DT_CharacterKit_Base.uasset deleted file mode 100644 index 4293628..0000000 --- a/Content/Wailing/Data/Character/Kits/DT_CharacterKit_Base.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ce33efc04b90862ef8ab55a4ebdd975dd70802f70e5f8ddeb15b3e0131e405e2 -size 1730 diff --git a/Content/Wailing/Input/Actions/AI_AutoRun.uasset b/Content/Wailing/Input/Actions/AI_AutoRun.uasset new file mode 100644 index 0000000..bfbed3c --- /dev/null +++ b/Content/Wailing/Input/Actions/AI_AutoRun.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0ab6df1f2e41e5b2179c46c45287d9b1482a73d2979f7c7d7f4fce209a17232 +size 1395 diff --git a/Content/Wailing/Input/Actions/AI_HoldPosition.uasset b/Content/Wailing/Input/Actions/AI_HoldPosition.uasset new file mode 100644 index 0000000..66a5745 --- /dev/null +++ b/Content/Wailing/Input/Actions/AI_HoldPosition.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02ae471e8f39705b6b418b4770b941a3ce4cda1645abf03627ebda0fc82a1c34 +size 1420 diff --git a/Content/Wailing/Input/Actions/AI_Move.uasset b/Content/Wailing/Input/Actions/AI_Move.uasset new file mode 100644 index 0000000..beaa2cd --- /dev/null +++ b/Content/Wailing/Input/Actions/AI_Move.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:296a24443b69f9e93be0cbefe9d6f61ddfeb061f015ebb592196be2958440b76 +size 1576 diff --git a/Content/Wailing/Input/IMC_Default.uasset b/Content/Wailing/Input/IMC_Default.uasset new file mode 100644 index 0000000..0f48499 --- /dev/null +++ b/Content/Wailing/Input/IMC_Default.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18158e0c1c627c06ae49bcc2d3dc44f5cd5d5b8ac80f9ba7cea358ad94e918ff +size 8143 diff --git a/Content/__ExternalActors__/Wailing/Maps/Playground/Playground/1/MR/A3KHXKPE3TFII5AIK14YSW.uasset b/Content/__ExternalActors__/Wailing/Maps/Playground/Playground/1/MR/A3KHXKPE3TFII5AIK14YSW.uasset new file mode 100644 index 0000000..2cc2088 --- /dev/null +++ b/Content/__ExternalActors__/Wailing/Maps/Playground/Playground/1/MR/A3KHXKPE3TFII5AIK14YSW.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:375ac8d218c611a5c76ac6b58a8704993d69c548b303a9b51d8078568f0bdade +size 9176 diff --git a/Content/__ExternalActors__/Wailing/Maps/Playground/Playground/A/FT/C423PA7UO8F82S3S5V7A2V.uasset b/Content/__ExternalActors__/Wailing/Maps/Playground/Playground/A/FT/C423PA7UO8F82S3S5V7A2V.uasset new file mode 100644 index 0000000..e30d554 --- /dev/null +++ b/Content/__ExternalActors__/Wailing/Maps/Playground/Playground/A/FT/C423PA7UO8F82S3S5V7A2V.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e5fb66f07524089e73193928d31660728a813f1e3fad9722da24091efff2ae7 +size 9196 diff --git a/Plugins/SlotBasedInventorySystem b/Plugins/SlotBasedInventorySystem new file mode 160000 index 0000000..b4b42be --- /dev/null +++ b/Plugins/SlotBasedInventorySystem @@ -0,0 +1 @@ +Subproject commit b4b42bea101880d1c262b36aea395c46ae837d3b diff --git a/Source/Wailing/Private/Components/AutoRunComponent.cpp b/Source/Wailing/Private/Components/AutoRunComponent.cpp new file mode 100644 index 0000000..0a306de --- /dev/null +++ b/Source/Wailing/Private/Components/AutoRunComponent.cpp @@ -0,0 +1,106 @@ +// Amasson + + +#include "Components/AutoRunComponent.h" +#include "Components/SplineComponent.h" +#include "NavigationSystem.h" +#include "NavigationPath.h" + + +UAutoRunComponent::UAutoRunComponent() +{ + PrimaryComponentTick.bCanEverTick = true; + + PathSpline = CreateDefaultSubobject("PathSpline"); +} + +void UAutoRunComponent::SetControlledPawn(APawn* Pawn) +{ + ControlledPawn = Pawn; +} + +void UAutoRunComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) +{ + Super::TickComponent(DeltaTime, TickType, ThisTickFunction); + + if (bAutoRunning) + if (IsValid(ControlledPawn) && IsValid(PathSpline)) + { + const FVector PawnLocation = ControlledPawn->GetActorLocation(); + const float ClosePointKey = PathSpline->FindInputKeyClosestToWorldLocation(PawnLocation); + const FVector LocationOnSpline = PathSpline->GetLocationAtSplineInputKey(ClosePointKey, ESplineCoordinateSpace::World); + const FVector SplineDirection = PathSpline->GetDirectionAtSplineInputKey(ClosePointKey, ESplineCoordinateSpace::World); + const FVector NextTargetPoint = PathSpline->GetLocationAtSplineInputKey(FMath::CeilToFloat(ClosePointKey + 0.5), ESplineCoordinateSpace::World); + FVector DirectionToNextTargetPoint = NextTargetPoint - PawnLocation; + + DirectionToNextTargetPoint.Normalize(); + + ControlledPawn->AddMovementInput((SplineDirection + DirectionToNextTargetPoint) / 2); + + if (ClosePointKey >= static_cast(PathSpline->GetNumberOfSplinePoints()) - 1.1) + bAutoRunning = false; + + } +} + +void UAutoRunComponent::StopAutoRun() +{ + bAutoRunning = false; +} + +void UAutoRunComponent::AutoRunKeyPressed() +{ + FollowTime = 0; + bAutoRunning = false; +} + +void UAutoRunComponent::AutoRunKeyReleased() +{ + if (!IsValid(ControlledPawn)) + return; + + if (FollowTime < ShortPressThreshold) + { + if (UNavigationPath* NavPath = UNavigationSystemV1::FindPathToLocationSynchronously(this, ControlledPawn->GetActorLocation(), CachedDestination)) + { + if (IsValid(PathSpline)) + { + PathSpline->ClearSplinePoints(); + for (const FVector& PointLoc : NavPath->PathPoints) + { + PathSpline->AddSplinePoint(PointLoc, ESplineCoordinateSpace::World); + } + } + if (!NavPath->PathPoints.IsEmpty()) + CachedDestination = NavPath->PathPoints[NavPath->PathPoints.Num() - 1]; + OnAutoWalkBegin.Broadcast(this, CachedDestination); + bAutoRunning = true; + } + } +} + +void UAutoRunComponent::AutoRunKeyHold(float DeltaTime, const FHitResult& CursorHit) +{ + FollowTime += DeltaTime; + + if (CursorHit.bBlockingHit) + { + CachedDestination = CursorHit.ImpactPoint; + if (IsValid(ControlledPawn)) + { + const FVector WorldDirection = (CachedDestination - ControlledPawn->GetActorLocation()).GetSafeNormal(); + ControlledPawn->AddMovementInput(WorldDirection); + } + } +} + +bool UAutoRunComponent::IsAtDestination() const +{ + if (!IsValid(ControlledPawn)) + return false; + + const float SquaredDistanceToDestination = (ControlledPawn->GetActorLocation() - CachedDestination).SquaredLength(); + const float SquaredAcceptanceRadius = AutoRunAcceptanceRadius * AutoRunAcceptanceRadius; + + return SquaredDistanceToDestination <= SquaredAcceptanceRadius; +} diff --git a/Source/Wailing/Private/Player/WLPlayerController.cpp b/Source/Wailing/Private/Player/WLPlayerController.cpp index d568b0f..8e0c1fb 100644 --- a/Source/Wailing/Private/Player/WLPlayerController.cpp +++ b/Source/Wailing/Private/Player/WLPlayerController.cpp @@ -2,4 +2,102 @@ #include "Player/WLPlayerController.h" +#include "Components/InteractionControllerComponent.h" +#include "Components/AutoRunComponent.h" +#include "EnhancedInputSubsystems.h" +#include "EnhancedInputComponent.h" + +AWLPlayerController::AWLPlayerController() +{ + InteractionComponent = CreateDefaultSubobject("InteractionComponent"); + AutoRunComponent = CreateDefaultSubobject("AutoRunComponent"); + + bShowMouseCursor = true; + DefaultMouseCursor = EMouseCursor::Default; +} + +void AWLPlayerController::BeginPlay() +{ + Super::BeginPlay(); + + if (UEnhancedInputLocalPlayerSubsystem* InputSubsystem = ULocalPlayer::GetSubsystem(GetLocalPlayer())) + { + checkf(InputContext, TEXT("WLPlayerController: Invalid Input Context")); + InputSubsystem->AddMappingContext(InputContext, 0); + } + + FInputModeGameAndUI InputModeData; + InputModeData.SetLockMouseToViewportBehavior(EMouseLockMode::DoNotLock); + InputModeData.SetHideCursorDuringCapture(false); + SetInputMode(InputModeData); +} + +void AWLPlayerController::AcknowledgePossession(APawn* P) +{ + Super::AcknowledgePossession(P); + + AutoRunComponent->SetControlledPawn(P); +} + +void AWLPlayerController::SetupInputComponent() +{ + Super::SetupInputComponent(); + + if (UEnhancedInputComponent* EnhancedInputComponent = Cast(InputComponent)) + { + EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &ThisClass::Move); + EnhancedInputComponent->BindAction(HoldPositionAction, ETriggerEvent::Triggered, this, &ThisClass::HoldPositionPressed); + EnhancedInputComponent->BindAction(HoldPositionAction, ETriggerEvent::Completed, this, &ThisClass::HoldPositionReleased); + EnhancedInputComponent->BindAction(AutoRunAction, ETriggerEvent::Started, this, &ThisClass::AutoRunPressed); + EnhancedInputComponent->BindAction(AutoRunAction, ETriggerEvent::Triggered, this, &ThisClass::AutoRunHeld); + EnhancedInputComponent->BindAction(AutoRunAction, ETriggerEvent::Completed, this, &ThisClass::AutoRunReleased); + } +} + +void AWLPlayerController::Move(const FInputActionValue& InputActionValue) +{ + const FVector2D InputAxisVector = InputActionValue.Get(); + + if (InputAxisVector.IsNearlyZero()) + return; + + AutoRunComponent->StopAutoRun(); + const FRotator Rotation = GetControlRotation(); + const FRotator YawRotation(0.0f, Rotation.Yaw, 0.0f); + const FRotationMatrix RotationMatrix(YawRotation); + + const FVector ForwardVector = RotationMatrix.GetUnitAxis(EAxis::X); + const FVector RightVector = RotationMatrix.GetUnitAxis(EAxis::Y); + + if (APawn* ControlledPawn = GetPawn()) + { + ControlledPawn->AddMovementInput(ForwardVector, InputAxisVector.Y); + ControlledPawn->AddMovementInput(RightVector, InputAxisVector.X); + } +} + +void AWLPlayerController::AutoRunPressed() +{ + AutoRunComponent->AutoRunKeyPressed(); +} + +void AWLPlayerController::AutoRunHeld() +{ + AutoRunComponent->AutoRunKeyHold(GetWorld()->GetDeltaSeconds(), InteractionComponent->GetCursorHit()); +} + +void AWLPlayerController::AutoRunReleased() +{ + AutoRunComponent->AutoRunKeyReleased(); +} + +void AWLPlayerController::HoldPositionPressed() +{ + AutoRunComponent->HoldPositionPressed(); +} + +void AWLPlayerController::HoldPositionReleased() +{ + AutoRunComponent->HoldPositionReleased(); +} diff --git a/Source/Wailing/Public/Components/AutoRunComponent.h b/Source/Wailing/Public/Components/AutoRunComponent.h new file mode 100644 index 0000000..894bb91 --- /dev/null +++ b/Source/Wailing/Public/Components/AutoRunComponent.h @@ -0,0 +1,73 @@ +// Amasson + +#pragma once + +#include "CoreMinimal.h" +#include "Components/ActorComponent.h" +#include "AutoRunComponent.generated.h" + +class USplineComponent; + +DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnAutoWalkBeginSignature, UAutoRunComponent*, AutoRunComponent, FVector, Destination); + + +UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) +class WAILING_API UAutoRunComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + + UAutoRunComponent(); + + UPROPERTY(BlueprintAssignable) + FOnAutoWalkBeginSignature OnAutoWalkBegin; + + void SetControlledPawn(APawn* Pawn); + + virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; + + void StopAutoRun(); + + void AutoRunKeyPressed(); + void AutoRunKeyReleased(); + void AutoRunKeyHold(float DeltaTime, const FHitResult& CursorHit); + + void HoldPositionPressed() + { + bIsHoldingPosition = true; + } + + void HoldPositionReleased() + { + bIsHoldingPosition = false; + } + + bool ShouldAutoRun() + { + return !bIsHoldingPosition; + } + + UFUNCTION(BlueprintCallable, BlueprintPure, Category = "Components") + USplineComponent* GetPathSpline() const { return PathSpline; } + +private: + + FVector CachedDestination = FVector::ZeroVector; + float FollowTime = 0.0f; + float ShortPressThreshold = 0.2f; + bool bAutoRunning = false; + + UPROPERTY(EditDefaultsOnly) + float AutoRunAcceptanceRadius = 50.0f; + + UPROPERTY(VisibleAnywhere) + TObjectPtr PathSpline; + + TObjectPtr ControlledPawn; + + bool bIsHoldingPosition; + + bool IsAtDestination() const; + +}; diff --git a/Source/Wailing/Public/Player/WLPlayerController.h b/Source/Wailing/Public/Player/WLPlayerController.h index 5e00b4e..10c564b 100644 --- a/Source/Wailing/Public/Player/WLPlayerController.h +++ b/Source/Wailing/Public/Player/WLPlayerController.h @@ -6,6 +6,8 @@ #include "Player/GRPlayerController.h" #include "WLPlayerController.generated.h" +class UInputAction; + /** * */ @@ -14,4 +16,45 @@ class WAILING_API AWLPlayerController : public AGRPlayerController { GENERATED_BODY() +protected: + + AWLPlayerController(); + + virtual void BeginPlay() override; + + virtual void AcknowledgePossession(APawn* P) override; + + virtual void SetupInputComponent() override; + + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components", meta = (AllowPrivateAccess = true)) + TObjectPtr InteractionComponent; + + UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "AutoRun", meta = (AllowPrivateAccess = true)) + TObjectPtr AutoRunComponent; + + UPROPERTY(EditAnywhere, Category = "Input") + TObjectPtr InputContext; + + UPROPERTY(EditAnywhere, Category = "Input") + TObjectPtr MoveAction; + + UPROPERTY(EditAnywhere, Category = "Input") + TObjectPtr HoldPositionAction; + + UPROPERTY(EditAnywhere, Category = "Input") + TObjectPtr AutoRunAction; + +private: + + + void Move(const struct FInputActionValue& InputActionValue); + + void AutoRunPressed(); + void AutoRunHeld(); + void AutoRunReleased(); + + void HoldPositionPressed(); + void HoldPositionReleased(); + }; diff --git a/Wailing.uproject b/Wailing.uproject index dc06db8..f66a29a 100644 --- a/Wailing.uproject +++ b/Wailing.uproject @@ -20,6 +20,10 @@ "TargetAllowList": [ "Editor" ] + }, + { + "Name": "FunctionalTestingEditor", + "Enabled": true } ] } \ No newline at end of file