diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 1353adb..dc96d83 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -51,3 +51,6 @@ ConnectionType=USBOnly bUseManualIPAddress=False ManualIPAddress= +[/Script/UnrealBuildTool.UnrealBuildTool] +bAllowGitCommandlineIntegration=False + diff --git a/Content/Blueprints/BP_TestChar.uasset b/Content/Blueprints/BP_TestChar.uasset index f825d16..c480c02 100644 --- a/Content/Blueprints/BP_TestChar.uasset +++ b/Content/Blueprints/BP_TestChar.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7cee5c08660418e74ed699ffc2467c3e8f04b9c044b25527a1e23611ad7aa453 -size 36236 +oid sha256:6ac38f4a38f72a3a97b438f3d68fd8eaac42b95a6402ac7457916168a33f2930 +size 36300 diff --git a/Content/Inputs/IA/IA_RunAction.uasset b/Content/Inputs/IA/IA_RunAction.uasset new file mode 100644 index 0000000..ff21243 --- /dev/null +++ b/Content/Inputs/IA/IA_RunAction.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61d2e56594b465611f7dbde4736f224d6b0e64fe38dc68b7925fa26808e7f7fc +size 1167 diff --git a/Content/Inputs/IMC/IMC_Context.uasset b/Content/Inputs/IMC/IMC_Context.uasset index c85dbb2..b99987c 100644 --- a/Content/Inputs/IMC/IMC_Context.uasset +++ b/Content/Inputs/IMC/IMC_Context.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:16c09456d7dca23b046cb9540b811211cea1afbe8b6038bd72bbcec1089e7885 -size 4410 +oid sha256:19b9a971e8f3dfd8084835586af6704e6069ced3be12b0a4dcf066c89f9fada5 +size 4873 diff --git a/Source/lonese/MyCharacter.cpp b/Source/lonese/MyCharacter.cpp index aa3a3a6..c2b15d2 100644 --- a/Source/lonese/MyCharacter.cpp +++ b/Source/lonese/MyCharacter.cpp @@ -5,6 +5,7 @@ #include "EnhancedInputSubsystems.h" #include "EnhancedInputComponent.h" +#include "GameFramework/CharacterMovementComponent.h" void AMyCharacter::Move(const FInputActionValue& Value) { @@ -18,10 +19,12 @@ void AMyCharacter::Move(const FInputActionValue& Value) void AMyCharacter::BeginRun(const FInputActionValue& Value) { bIsRunning = true; + GetCharacterMovement()->MaxWalkSpeed = 1200.0f; } void AMyCharacter::StopRun(const FInputActionValue& Value) { bIsRunning = false; + GetCharacterMovement()->MaxWalkSpeed = 600.0f; } // Sets default values @@ -68,6 +71,10 @@ void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCompone if (MoveAction) { EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AMyCharacter::Move); } + if (RunAction) { + EnhancedInputComponent->BindAction(RunAction, ETriggerEvent::Started, this, &AMyCharacter::BeginRun); + EnhancedInputComponent->BindAction(RunAction, ETriggerEvent::Completed, this, &AMyCharacter::StopRun); + } } }