From 1bad8e09eb465890c1e76a4d1721b70d52182db8 Mon Sep 17 00:00:00 2001 From: JKuijperM Date: Wed, 28 Dec 2022 17:20:08 +0100 Subject: [PATCH] Modified the running animation and disable the crouch option --- .../Characters/Zombies/Animations/ABP_Zombie.uasset | 4 ++-- .../Zombies/Animations/Zombie_Running.uasset | 3 +++ Source/EndlessZombie/EndlessZombieGameMode.cpp | 2 +- Source/EndlessZombie/ZombieCharacter.cpp | 12 +++++++----- Source/EndlessZombie/ZombieCharacter.h | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 Content/Characters/Zombies/Animations/Zombie_Running.uasset diff --git a/Content/Characters/Zombies/Animations/ABP_Zombie.uasset b/Content/Characters/Zombies/Animations/ABP_Zombie.uasset index 373f8bd..f334da5 100644 --- a/Content/Characters/Zombies/Animations/ABP_Zombie.uasset +++ b/Content/Characters/Zombies/Animations/ABP_Zombie.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8beef2e1629bd45bd960973f6999d501dcdd359b6f5bbc265c4a9e48114acefc -size 366804 +oid sha256:1f983f515c9d12a6e03a1f7b7aa98995ad33df081a5d033b12657936ae5aefdf +size 362516 diff --git a/Content/Characters/Zombies/Animations/Zombie_Running.uasset b/Content/Characters/Zombies/Animations/Zombie_Running.uasset new file mode 100644 index 0000000..d02c737 --- /dev/null +++ b/Content/Characters/Zombies/Animations/Zombie_Running.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a376a1e5834a5326b9cbc63b43682d17c39a5f5b04a62210fe3237771cf34c6c +size 928448 diff --git a/Source/EndlessZombie/EndlessZombieGameMode.cpp b/Source/EndlessZombie/EndlessZombieGameMode.cpp index 9f238aa..90ab1c2 100644 --- a/Source/EndlessZombie/EndlessZombieGameMode.cpp +++ b/Source/EndlessZombie/EndlessZombieGameMode.cpp @@ -7,7 +7,7 @@ AEndlessZombieGameMode::AEndlessZombieGameMode() { // set default pawn class to our Blueprinted character - static ConstructorHelpers::FClassFinder PlayerPawnBPClass(TEXT("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter")); + static ConstructorHelpers::FClassFinder PlayerPawnBPClass(TEXT("/Game/OLD/ThirdPerson/Blueprints/BP_ThirdPersonCharacter")); if (PlayerPawnBPClass.Class != NULL) { DefaultPawnClass = PlayerPawnBPClass.Class; diff --git a/Source/EndlessZombie/ZombieCharacter.cpp b/Source/EndlessZombie/ZombieCharacter.cpp index 187f3c9..f89ff16 100644 --- a/Source/EndlessZombie/ZombieCharacter.cpp +++ b/Source/EndlessZombie/ZombieCharacter.cpp @@ -87,7 +87,9 @@ void AZombieCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCom EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AZombieCharacter::Move); // Crouching - EnhancedInputComponent->BindAction(CrouchAction, ETriggerEvent::Triggered, this, &AZombieCharacter::Crouch); + //EnhancedInputComponent->BindAction(CrouchAction, ETriggerEvent::Triggered, this, &AZombieCharacter::Crouch); + //EnhancedInputComponent->BindAction(CrouchAction, ETriggerEvent::Triggered, this, &ACharacter::); + //EnhancedInputComponent->BindAction(CrouchAction, ETriggerEvent::Completed, this, &ACharacter::StopCrouching); } } @@ -113,10 +115,10 @@ void AZombieCharacter::Move(const FInputActionValue& Value) } } -void AZombieCharacter::Crouch(const FInputActionValue& Value) -{ - -} +//void AZombieCharacter::Crouch(const FInputActionValue& Value) +//{ +// +//} void AZombieCharacter::MoveForwardConstant(float DeltaTime) { diff --git a/Source/EndlessZombie/ZombieCharacter.h b/Source/EndlessZombie/ZombieCharacter.h index f1dc85d..6d1955a 100644 --- a/Source/EndlessZombie/ZombieCharacter.h +++ b/Source/EndlessZombie/ZombieCharacter.h @@ -48,7 +48,7 @@ protected: virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override; void Move(const FInputActionValue& Value); - void Crouch(const FInputActionValue& Value); + //void Crouch(const FInputActionValue& Value); public: // Called every frame