New Audio
New firing sounds for APA and Titanium Railgun (requested by Metarex) Also fixes an audio bug on APA
This commit is contained in:
1 parent
34d039fc09
commit
7eb7b19951
4 files changed
+9
-5
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Particles;
|
||||
using CalamityMod.Projectiles.BaseProjectiles;
|
||||
@@ -60,7 +61,7 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
else if (SoundEngine.TryGetActiveSound(ChargeupSoundSlot, out var soundOut) && soundOut.IsPlaying)
|
||||
{
|
||||
soundOut.Sound.Pitch = ChargeTimer * 2f;
|
||||
soundOut.Sound.Pitch = MathF.Min(ChargeTimer * 2f, 1);
|
||||
soundOut.Position = Projectile.Center;
|
||||
}
|
||||
|
||||
@@ -112,8 +113,10 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
|
||||
private void FiringEffects(Color color)
|
||||
{
|
||||
SoundEngine.PlaySound(SoundID.Item92, GunTipPosition);
|
||||
SoundEngine.PlaySound(SoundID.Item60, GunTipPosition);
|
||||
bool redBeam = (color == new Color(235, 40, 121));
|
||||
SoundEngine.PlaySound(SoundID.Item92 with { pitch = 0.7f, volume = 0.7f }, GunTipPosition);
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/APAShoot");
|
||||
SoundEngine.PlaySound(fire with { pitch = (redBeam ? 0.3f : -0.2f)}, GunTipPosition);
|
||||
|
||||
Particle pulse = new DirectionalPulseRing(GunTipPosition + Projectile.rotation.ToRotationVector2() * 5f, Vector2.Zero, color, new Vector2(0.5f, 1f), Projectile.rotation, 0.05f, 0.34f + Main.rand.NextFloat(0.3f), 30);
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
@@ -125,7 +125,8 @@ namespace CalamityMod.Projectiles.Ranged
|
||||
GeneralParticleHandler.SpawnParticle(pulse);
|
||||
|
||||
// Play a sound with volume scaling with charge percent
|
||||
SoundEngine.PlaySound(SoundID.Item62 with { Volume = SoundID.Item62.Volume * ChargePercent }, Owner.MountedCenter);
|
||||
SoundStyle fire = new("CalamityMod/Sounds/Item/TitaniumRailgunShoot");
|
||||
SoundEngine.PlaySound(fire with { Volume = ChargePercent }, Owner.MountedCenter);
|
||||
|
||||
// Set the initial recoil, mark the projectile as fired, and set the target recoil
|
||||
Owner.itemRotation = initialRecoil;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user