Terraria.ModLoader.ModTile.KillSound C# (CSharp) Method

KillSound() public method

public KillSound ( int i, int j ) : bool
i int
j int
return bool
		public virtual bool KillSound(int i, int j)
		{
			return true;
		}

Usage Example

Ejemplo n.º 1
0
        //in Terraria.WorldGen.KillTile inside if (!effectOnly && !WorldGen.stopDrops) for playing sounds
        //  add if(!TileLoader.KillSound(i, j, tile.type)) { } to beginning of if/else chain and turn first if into else if
        public static bool KillSound(int i, int j, int type)
        {
            foreach (var hook in HookKillSound)
            {
                if (!hook(i, j, type))
                {
                    return(false);
                }
            }
            ModTile modTile = GetTile(type);

            if (modTile != null)
            {
                if (!modTile.KillSound(i, j))
                {
                    return(false);
                }
                Main.PlaySound(modTile.soundType, i * 16, j * 16, modTile.soundStyle);
                return(false);
            }
            return(true);
        }
All Usage Examples Of Terraria.ModLoader.ModTile::KillSound