diff --git a/Source/Nakatomi/PlayerCharacter.cpp b/Source/Nakatomi/PlayerCharacter.cpp index b3552f1..ce5e721 100644 --- a/Source/Nakatomi/PlayerCharacter.cpp +++ b/Source/Nakatomi/PlayerCharacter.cpp @@ -345,6 +345,11 @@ void APlayerCharacter::ProcessHits(TArray hits) if (!healthComponent->GetIsDead()) { OnEnemyHit.ExecuteIfBound(); + + if (HitMarkerSound) + { + UGameplayStatics::PlaySound2D(GetWorld(), HitMarkerSound); + } } } } diff --git a/Source/Nakatomi/PlayerCharacter.h b/Source/Nakatomi/PlayerCharacter.h index cfe6171..e23ecea 100644 --- a/Source/Nakatomi/PlayerCharacter.h +++ b/Source/Nakatomi/PlayerCharacter.h @@ -111,6 +111,9 @@ private: float AimSensitivity; float WeaponSpreadMultiplier = 1.0; + + UPROPERTY(EditDefaultsOnly) + USoundBase* HitMarkerSound; public: // Sets default values for this character's properties