Урон курьера

This commit is contained in:
ThomasCharester committed 2025-12-03 14:13:45 +03:00
1 parent 2b656412d5
commit dd1399e015
7 files changed
+34 -1170

No files matched your search

@@ -159,6 +159,7 @@ namespace Code.App.AppStates
private void PlayerDamageTaken(int damage, PlayerHealth health)
{
Context.AudioService.PlayDispatcher((DispatcherSounds)Random.Range((int)DispatcherSounds.TakeDamage1,(int)DispatcherSounds.TakeDamage4));
Context.AudioService.PlayCourier((CourierSounds)Random.Range((int)CourierSounds.Damage1,(int)CourierSounds.Damage2));
}
// DEBUG
private void InstaKillDEBUG(InputAction.CallbackContext context)
@@ -32,6 +32,8 @@ namespace Code.Audio
}
public enum CourierSounds
{
Step
Step,
Damage1,
Damage2
}
}
@@ -221,6 +221,12 @@ namespace Code.Audio
AudioSourceType.NoBlend, () => OnDispatcherEnded?.Invoke()).Forget();
}
public void PlayCourier(CourierSounds courierSounds)
{
_audioSourcePool.PlayOneShot(_audioFactory.CourierAudios[(int)courierSounds],
_audioMixerGroups[AudioType.Courier],
AudioSourceType.NoBlend).Forget();
}
private CancellationTokenSource _testClipCancellationTokenSource = new();
private void ResetCurrentTestAudioSource() => _currentTestClipAudioType = AudioType.Master;
@@ -25,5 +25,6 @@ namespace Code.Audio
void PlayTestClip(AudioType audioType);
AudioSource GetSourceOfGroup(AudioType group);
void ReleaseSourceOfGroup(AudioSource source);
void PlayCourier(CourierSounds range);
}
}