diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset index 76991298..af1aeccc 100644 --- a/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:76a05bba142f49ac64cd4ccb3c1ba1998bb54ba39510c42f8204dd22d3c1fcd2 -size 54132 +oid sha256:29a9b2fccbf432819ea9a64b75f802f6b121dd5e7a2c34ada69ecf08057f1ace +size 54773 diff --git a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp index 53a1e62e..6e3adfb6 100644 --- a/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/EndlessVendettaCharacter.cpp @@ -89,6 +89,15 @@ void AEndlessVendettaCharacter::Tick(float DeltaTime) { bIsPlayerMoving = false; } + if (bPressedJump) + { + UE_LOG(LogTemp, Display, TEXT("Player Jumped")); + if(CurrentStamina <= 0.0f) + { + CurrentStamina -= 20.0f; + UE_LOG(LogTemp, Display, TEXT("Current Stam: %f"), CurrentStamina); + } + } //PLAYER STAMINA HANDLING if (bIsPlayerSprinting) { @@ -110,6 +119,16 @@ void AEndlessVendettaCharacter::Tick(float DeltaTime) } CurrentStamina += FMath::Clamp(StaminaRegenRate, 0.0f, 100.0f); } + //make your own jump and call the default character jump + // if (bPressedJump) + // { + // UE_LOG(LogTemp, Display, TEXT("Player Jumped")); + // if(CurrentStamina <= 0.0f) + // { + // CurrentStamina -= 20.0f; + // UE_LOG(LogTemp, Display, TEXT("Current Stam: %f"), CurrentStamina); + // } + // } } void AEndlessVendettaCharacter::RegenHealth() @@ -154,7 +173,7 @@ void AEndlessVendettaCharacter::SetupPlayerInputComponent(class UInputComponent* //Jumping EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Triggered, this, &ACharacter::Jump); EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Completed, this, &ACharacter::StopJumping); - + //Moving EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AEndlessVendettaCharacter::Move); EnhancedInputComponent->BindAction(SprintAction, ETriggerEvent::Started, this, &AEndlessVendettaCharacter::Sprint);