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())
|
if (!healthComponent->GetIsDead())
|
||||||
{
|
{
|
||||||
OnEnemyHit.ExecuteIfBound();
|
OnEnemyHit.ExecuteIfBound();
|
||||||
|
|
||||||
|
if (HitMarkerSound)
|
||||||
|
{
|
||||||
|
UGameplayStatics::PlaySound2D(GetWorld(), HitMarkerSound);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,6 +112,9 @@ private:
|
||||||
|
|
||||||
float WeaponSpreadMultiplier = 1.0;
|
float WeaponSpreadMultiplier = 1.0;
|
||||||
|
|
||||||
|
UPROPERTY(EditDefaultsOnly)
|
||||||
|
USoundBase* HitMarkerSound;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Sets default values for this character's properties
|
// Sets default values for this character's properties
|
||||||
APlayerCharacter();
|
APlayerCharacter();
|
||||||
|
|
Loading…
Reference in New Issue