Пример #1
0
 public void onPickUp(s_Player p)
 {
     if (p.SetEquippedWeapon(this)) // checks to make the weapon is not one just dropped if it is not then it equips it and continues
     {
         AudioControlerScript.PlaySound(AudioControlerScript.Clips.pickup_gun_001);
         SetHolder(p);
         p.AddWeaponToHand(this);
         holderColor = p.PlayerColor;
         tossed      = null;
         p.PlayPickupSound();
         doPickUpEffect();
     }
 }
    public void PlayDeflectionSound()
    {
        switch (NameOfWeapon)
        {
        case WeaponName.NULL:
            break;

        case WeaponName.SMG:
            break;

        case WeaponName.FryingPan:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.pan_hit_002);
            break;

        case WeaponName.Shotgun:
            break;

        case WeaponName.Boomerang:
            break;

        case WeaponName.Revolver:
            break;

        case WeaponName.MegaKatana:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.katana_slash_002);
            break;

        case WeaponName.Flamethrower:
            break;

        case WeaponName.GrenadeLauncher:
            break;

        case WeaponName.PlasmaGun:
            break;

        case WeaponName.CrossBow:
            break;

        case WeaponName.MissileLauncher:
            break;

        case WeaponName.DuckGrenade:
            break;

        default:
            Debug.LogError("No case for deflection sound effect for weapon " + NameOfWeapon.ToString() + " on gameobject " + gameObject.name);
            break;
        }
    }
Пример #3
0
    protected void playFireSoundEffect()
    {
        switch (NameOfWeapon)
        {
        case WeaponName.NULL:
            break;

        case WeaponName.SMG:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.machine_gun_shot_002);
            break;

        case WeaponName.FryingPan:
            break;

        case WeaponName.Shotgun:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.shotgun_blast_002);
            break;

        case WeaponName.Boomerang:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.boomerang_001);
            break;

        case WeaponName.Revolver:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.pistol_shot_002);
            break;

        case WeaponName.MegaKatana:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.katana_slash_002);
            break;

        case WeaponName.Flamethrower:
            break;

        case WeaponName.GrenadeLauncher:
            break;

        case WeaponName.PlasmaGun:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.plasma_cannon_Alexander);
            break;

        case WeaponName.CrossBow:
        case WeaponName.AutoCrossbow:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.crossbow_shot_001);
            break;

        case WeaponName.MissileLauncher:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.missile_001);
            break;

        case WeaponName.DuckGrenade:
            break;

        case WeaponName.RayGun:
            break;

        case WeaponName.BlackHoleGun:
            break;

        case WeaponName.Rifle:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.sniper_rifle_Alexander);
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.pickup_gun_001);
            break;

        case WeaponName.LightningGun:
            break;

        case WeaponName.Shrukien:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.shruiken_Alexander);
            break;

        case WeaponName.SpikeGun:
            AudioControlerScript.PlaySound(AudioControlerScript.Clips.spike_gun_Alexander);
            break;

        default:
            Debug.Log("No sound effect set for " + gameObject.name + " attack sound");
            break;
        }
    }