Yharon fire breath sound

This commit is contained in:
Dominic authored and Cameron Ewell committed 2021-06-21 14:04:35 -04:00
1 parent 084e5a0fea
commit 13fcd767b1
3 files changed
+20

No files matched your search

+2
View File
@@ -2070,6 +2070,7 @@ namespace CalamityMod.NPCs.Yharon
int direction = (targetData.Center.X > vectorCenter.X) ? 1 : -1;
npc.velocity = new Vector2(direction, 0f) * fireballBreathPhaseVelocity;
npc.direction = npc.spriteDirection = direction;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonFire"), npc.Center);
}
if (npc.ai[1] >= fireballBreathTimer)
@@ -2131,6 +2132,7 @@ namespace CalamityMod.NPCs.Yharon
npc.rotation += pie;
npc.velocity = vector6 * splittingFireballBreathPhaseVelocity;
Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/YharonFire"), npc.Center);
}
else
{
+18
View File
@@ -0,0 +1,18 @@
using Microsoft.Xna.Framework.Audio;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Sounds.Custom
{
public class YharonFire : ModSound
{
public override SoundEffectInstance PlaySound(ref SoundEffectInstance soundInstance, float volume, float pan, SoundType type)
{
soundInstance = sound.CreateInstance();
soundInstance.Volume = volume;
soundInstance.Pan = pan;
Main.PlaySoundInstance(soundInstance);
return soundInstance;
}
}
}
Binary file not shown.