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

◆ KillSound()

static bool Terraria.ModLoader.TileLoader.KillSound ( int i,
int j,
int type,
bool fail )
inlinestatic

Definition at line 514 of file TileLoader.cs.

515 {
516 //IL_004b: Unknown result type (might be due to invalid IL or missing references)
518 for (int k = 0; k < hookKillSound.Length; k++)
519 {
520 if (!hookKillSound[k](i, j, type, fail))
521 {
522 return false;
523 }
524 }
525 ModTile modTile = GetTile(type);
526 if (modTile != null)
527 {
528 if (!modTile.KillSound(i, j, fail))
529 {
530 return false;
531 }
532 SoundEngine.PlaySound(modTile.HitSound, (Vector2?)new Vector2((float)(i * 16), (float)(j * 16)));
533 return false;
534 }
535 return true;
536 }
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 ...
static ModTile GetTile(int type)
Gets the ModTile instance with the given type. If no ModTile with the given type exists,...
static Func< int, int, int, bool, bool >[] HookKillSound
Definition TileLoader.cs:65

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookKillSound, and Terraria.Audio.SoundEngine.PlaySound().

Referenced by Terraria.WorldGen.KillTile_PlaySounds().

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