Add sound effects and audio clips for weapons and actions; implement shot and damage sounds
This commit is contained in:
@@ -12,6 +12,7 @@ namespace Weapons
|
||||
private float timer;
|
||||
|
||||
[OdinSerialize, InlineProperty] public WeaponStats weaponStats = new();
|
||||
public AudioClip shotSound;
|
||||
public Character character;
|
||||
|
||||
private void Update()
|
||||
@@ -39,6 +40,12 @@ namespace Weapons
|
||||
{
|
||||
return weaponStats.range * character.attributes.AttackRange;
|
||||
}
|
||||
|
||||
protected void PlayShotSound()
|
||||
{
|
||||
if (!shotSound) return;
|
||||
AudioSource.PlayClipAtPoint(shotSound, transform.position);
|
||||
}
|
||||
|
||||
public abstract void Fire();
|
||||
}
|
||||
|
Reference in New Issue
Block a user