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

CanKillTile() public method

public CanKillTile ( int i, int j, bool &blockDamaged ) : bool
i int
j int
blockDamaged bool
return bool
		public virtual bool CanKillTile(int i, int j, ref bool blockDamaged)
		{
			return true;
		}

Usage Example

Ejemplo n.º 1
0
        //in Terraria.WorldGen.CanKillTile after check for tile.active() add
        //  if(!TileLoader.CanKillTile(i, j, tile.type, ref blockDamaged)) { return false; }
        public static bool CanKillTile(int i, int j, int type, ref bool blockDamaged)
        {
            foreach (GlobalTile globalTile in globalTiles)
            {
                if (!globalTile.CanKillTile(i, j, type, ref blockDamaged))
                {
                    return(false);
                }
            }
            ModTile modTile = GetTile(type);

            if (modTile != null)
            {
                return(modTile.CanKillTile(i, j, ref blockDamaged));
            }
            return(true);
        }