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

◆ PlayGuitarChord()

void Terraria.Player.PlayGuitarChord ( float range)
inline

Definition at line 46585 of file Player.cs.

46586 {
46587 //IL_0018: Unknown result type (might be due to invalid IL or missing references)
46588 //IL_0031: Unknown result type (might be due to invalid IL or missing references)
46589 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
46590 //IL_0063: Unknown result type (might be due to invalid IL or missing references)
46591 //IL_008b: Unknown result type (might be due to invalid IL or missing references)
46592 //IL_007c: Unknown result type (might be due to invalid IL or missing references)
46593 int num = 6;
46594 float num2 = 1f / (float)num;
46595 if (range > num2 * 5f)
46596 {
46597 SoundEngine.PlaySound(49, base.Center);
46598 }
46599 else if (range > num2 * 4f)
46600 {
46601 SoundEngine.PlaySound(48, base.Center);
46602 }
46603 else if (range > num2 * 3f)
46604 {
46605 SoundEngine.PlaySound(47, base.Center);
46606 }
46607 else if (range > num2 * 2f)
46608 {
46609 SoundEngine.PlaySound(51, base.Center);
46610 }
46611 else if (range > num2 * 1f)
46612 {
46613 SoundEngine.PlaySound(52, base.Center);
46614 }
46615 else
46616 {
46617 SoundEngine.PlaySound(50, base.Center);
46618 }
46619 }
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: