public void PlayGuardSound() { if (guardType == blockingType.reflect) { SoundEngine.PlaySound(SoundLoader.GetLegacySoundSlot(Mod, "Sounds/keybladeBlocking")); } else if (guardType == blockingType.normal || guardType == blockingType.reversal) { SoundEngine.PlaySound(SoundID.Item1.SoundId, x: (int)Player.Center.X, y: (int)Player.Center.Y, volumeScale: 3); } }
public override bool?UseItem(Player player) { FargoPlayer modPlayer = player.GetFargoPlayer(); modPlayer.BattleCry = !modPlayer.BattleCry; string text = "Spawn rates " + (modPlayer.BattleCry ? "increased!" : "decreased!"); if (Main.netMode == NetmodeID.SinglePlayer) { Main.NewText(text, new Color(175, 75, 255)); } else if (Main.netMode == NetmodeID.Server) { ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(text), new Color(175, 75, 255)); } if (!Main.dedServ) { SoundEngine.PlaySound(SoundLoader.GetLegacySoundSlot(Mod, "Sounds/Horn").WithVolume(1f), player.Center); } return(true); }
public override void OnSelected() { SoundEngine.PlaySound(SoundLoader.GetLegacySoundSlot(Mod, "Sounds/keybladeBlocking")); // Plays a thunder sound when this ModMenu is selected }