private void PlayBrokenSound(Target which) { if (which == Target.Kitty) { CatShotSound.PlayRandomPitch(); } else { GrandmaShotSound.PlayRandomPitch(); } }
private void Reload(bool red) { int i = GetIndex(red); Bullets[i] = MAG_SIZE; Reloading[i] = 0; ReloadSFX.PlayRandomPitch(); SendMessage("Reloaded", red); }
public void Fire(bool red) { if (CanFire(red)) { FireSFX.PlayRandomPitch(); int i = GetIndex(red); Bullets[i] -= 1; SendMessage((red ? "Red" : "Blue") + "Fired", Bullets[i]); if (Bullets[i] == 0) { SendMessage("OutOfAmmo", red); } } }
public void AddBullet(bool red) { int i = GetIndex(red); Reloading[i] = Mathf.Min(Reloading[i] + 1, MAG_SIZE); LoadClickSFX.PlayRandomPitch(); if (Reloading[i] == MAG_SIZE) { Reload(red); } else { SendReloadingMessage(i); } }
private void PlayHitSound(Target which) { RandomPitch sound = which == Target.Grandma ? SmoochSound : ScratchSound; sound.PlayRandomPitch(); }