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

◆ KillSound()

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

Definition at line 168 of file WallLoader.cs.

169 {
170 //IL_004b: Unknown result type (might be due to invalid IL or missing references)
172 for (int k = 0; k < hookKillSound.Length; k++)
173 {
174 if (!hookKillSound[k](i, j, type, fail))
175 {
176 return false;
177 }
178 }
179 ModWall modWall = GetWall(type);
180 if (modWall != null)
181 {
182 if (!modWall.KillSound(i, j, fail))
183 {
184 return false;
185 }
186 SoundEngine.PlaySound(modWall.HitSound, (Vector2?)new Vector2((float)(i * 16), (float)(j * 16)));
187 return false;
188 }
189 return true;
190 }
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 ModWall GetWall(int type)
Gets the ModWall instance with the given type. If no ModWall with the given type exists,...
Definition WallLoader.cs:83
static Func< int, int, int, bool, bool >[] HookKillSound
Definition WallLoader.cs:41

References Terraria.ModLoader.WallLoader.GetWall(), Terraria.ModLoader.WallLoader.HookKillSound, and Terraria.Audio.SoundEngine.PlaySound().

Referenced by Terraria.WorldGen.KillWall_PlaySounds().

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