public static CoverupWall FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); char tileType = node.AttrChar("tiletype", '3'); int width = node.AttrInt("width", 0); int height = node.AttrInt("height", 0); CoverupWall entity = new CoverupWall(tileType, width, height); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }
public static DashBlock FromElement(MapElement node) { int x = node.AttrInt("x", 0); int y = node.AttrInt("y", 0); char tileType = node.AttrChar("tiletype", '3'); int width = node.AttrInt("width", 0); int height = node.AttrInt("height", 0); bool blend = node.AttrBool("blendin", false); DashBlock entity = new DashBlock(tileType, width, height, blend); entity.Position = new Vector2(x, y); entity.ID = node.AttrInt("id", 0); return(entity); }