TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ PlayDrums()

void Terraria.Player.PlayDrums ( float range)
inline

Definition at line 46621 of file Player.cs.

46622 {
46623 //IL_0019: Unknown result type (might be due to invalid IL or missing references)
46624 //IL_0032: Unknown result type (might be due to invalid IL or missing references)
46625 //IL_004b: Unknown result type (might be due to invalid IL or missing references)
46626 //IL_0064: Unknown result type (might be due to invalid IL or missing references)
46627 //IL_007d: Unknown result type (might be due to invalid IL or missing references)
46628 //IL_0096: Unknown result type (might be due to invalid IL or missing references)
46629 //IL_00af: Unknown result type (might be due to invalid IL or missing references)
46630 //IL_00c8: Unknown result type (might be due to invalid IL or missing references)
46631 //IL_00f0: Unknown result type (might be due to invalid IL or missing references)
46632 //IL_00e1: Unknown result type (might be due to invalid IL or missing references)
46633 int num = 10;
46634 float num2 = 1f / (float)num;
46635 if (range > num2 * 9f)
46636 {
46637 SoundEngine.PlaySound(59, base.Center);
46638 }
46639 else if (range > num2 * 8f)
46640 {
46641 SoundEngine.PlaySound(58, base.Center);
46642 }
46643 else if (range > num2 * 7f)
46644 {
46645 SoundEngine.PlaySound(53, base.Center);
46646 }
46647 else if (range > num2 * 6f)
46648 {
46649 SoundEngine.PlaySound(57, base.Center);
46650 }
46651 else if (range > num2 * 5f)
46652 {
46653 SoundEngine.PlaySound(62, base.Center);
46654 }
46655 else if (range > num2 * 4f)
46656 {
46657 SoundEngine.PlaySound(61, base.Center);
46658 }
46659 else if (range > num2 * 3f)
46660 {
46661 SoundEngine.PlaySound(54, base.Center);
46662 }
46663 else if (range > num2 * 2f)
46664 {
46665 SoundEngine.PlaySound(56, base.Center);
46666 }
46667 else if (range > num2 * 1f)
46668 {
46669 SoundEngine.PlaySound(55, base.Center);
46670 }
46671 else
46672 {
46673 SoundEngine.PlaySound(60, base.Center);
46674 }
46675 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...

References Terraria.Audio.SoundEngine.PlaySound().

Referenced by Terraria.Player.ItemCheck_PlayInstruments().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: