Exemplo n.º 1
0
 private void PlayBrokenSound(Target which)
 {
     if (which == Target.Kitty)
     {
         CatShotSound.PlayRandomPitch();
     }
     else
     {
         GrandmaShotSound.PlayRandomPitch();
     }
 }
Exemplo n.º 2
0
    private void Reload(bool red)
    {
        int i = GetIndex(red);

        Bullets[i]   = MAG_SIZE;
        Reloading[i] = 0;

        ReloadSFX.PlayRandomPitch();

        SendMessage("Reloaded", red);
    }
Exemplo n.º 3
0
 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);
         }
     }
 }
Exemplo n.º 4
0
    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);
        }
    }
Exemplo n.º 5
0
    private void PlayHitSound(Target which)
    {
        RandomPitch sound = which == Target.Grandma ? SmoochSound : ScratchSound;

        sound.PlayRandomPitch();
    }