diff --git a/Content/Input/Actions/IA_Look.uasset b/Content/Input/Actions/IA_Look.uasset index ebe3e3a..a4edc6c 100644 --- a/Content/Input/Actions/IA_Look.uasset +++ b/Content/Input/Actions/IA_Look.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72f7671fc22d7a8d76bc1086add528ef022071e032e55d3e6cee0c583ac14a13 +oid sha256:c4eef240c96f8698427466456c58d12f75d945614fe84fd3e1766319e37ab619 size 1473 diff --git a/Content/Input/InputMappingContext.uasset b/Content/Input/InputMappingContext.uasset index 0f95b6f..318dff2 100644 --- a/Content/Input/InputMappingContext.uasset +++ b/Content/Input/InputMappingContext.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:64250b131888a79dcf0cfbef950ed21f82258456aa2bb4e3afe7ae56f3c312b3 -size 18203 +oid sha256:b2c749222f80e3692e3deeea1e560981de77784e270c77eac4049875b0f33774 +size 19556 diff --git a/Content/Player/PlayerCharacter.uasset b/Content/Player/PlayerCharacter.uasset index 4143ac1..596648d 100644 --- a/Content/Player/PlayerCharacter.uasset +++ b/Content/Player/PlayerCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d94fb9f4eae93d276f156335de23b2e058d372798a87b787c1efb2e71473ee7 -size 40465 +oid sha256:b032bf212c4fff171c7e2c444384dd2da64a98a3a02d59b79672123716c24d83 +size 40686 diff --git a/Source/Nakatomi/PlayerCharacter.cpp b/Source/Nakatomi/PlayerCharacter.cpp index bebb071..ebbb033 100644 --- a/Source/Nakatomi/PlayerCharacter.cpp +++ b/Source/Nakatomi/PlayerCharacter.cpp @@ -182,6 +182,11 @@ void APlayerCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputCom Input->BindAction(ThrowExplosiveAction, ETriggerEvent::Started, this, &APlayerCharacter::ThrowExplosiveCallback); } + + if (PauseAction) + { + Input->BindAction(PauseAction, ETriggerEvent::Completed, this, &APlayerCharacter::PauseCallback); + } } } @@ -482,6 +487,10 @@ void APlayerCharacter::EndAimDownSightsCallback(const FInputActionInstance& Inst true, EMoveComponentAction::Type::Move, LatentActionInfo); } +void APlayerCharacter::PauseCallback(const FInputActionInstance& Instance) +{ +} + void APlayerCharacter::OnFire() { if (!IsFiring || CurrentWeapon->GetAmmoCount() == 0) diff --git a/Source/Nakatomi/PlayerCharacter.h b/Source/Nakatomi/PlayerCharacter.h index 635e8d5..82928fd 100644 --- a/Source/Nakatomi/PlayerCharacter.h +++ b/Source/Nakatomi/PlayerCharacter.h @@ -54,6 +54,15 @@ public: UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) UInputAction* ThrowExplosiveAction; + + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) + UInputAction* PauseAction; + + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) + UInputAction* WeaponSwitchingAction; + + UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) + UInputAction* AimDownSightsAction; UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) TSoftObjectPtr InputMappingContext; @@ -61,12 +70,6 @@ public: UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) int MappingPriority = 0; - UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) - UInputAction* WeaponSwitchingAction; - - UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) - UInputAction* AimDownSightsAction; - UPROPERTY(EditDefaultsOnly, BlueprintReadWrite) TSubclassOf PlayerHUD; @@ -161,6 +164,8 @@ public: void EndAimDownSightsCallback(const FInputActionInstance& Instance); + void PauseCallback(const FInputActionInstance& Instance); + virtual void OnFire() override; void WeaponCooldownHandler();