Add HitMarker Sound Effect
This commit is contained in:
parent
e97d370d23
commit
7079c129f7
|
@ -345,6 +345,11 @@ void APlayerCharacter::ProcessHits(TArray<FHitResult> hits)
|
|||
if (!healthComponent->GetIsDead())
|
||||
{
|
||||
OnEnemyHit.ExecuteIfBound();
|
||||
|
||||
if (HitMarkerSound)
|
||||
{
|
||||
UGameplayStatics::PlaySound2D(GetWorld(), HitMarkerSound);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,6 +112,9 @@ private:
|
|||
|
||||
float WeaponSpreadMultiplier = 1.0;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
USoundBase* HitMarkerSound;
|
||||
|
||||
public:
|
||||
// Sets default values for this character's properties
|
||||
APlayerCharacter();
|
||||
|
|
Loading…
Reference in New Issue