internal OgmoTile(ContentReader reader, OgmoTileLayer layer) { this.Height = reader.ReadInt32(); this.Position = reader.ReadVector2(); this.SourceIndex = reader.ReadInt32(); Vector2 offset = reader.ReadVector2(); Point point = new Point((int)offset.X, (int)offset.Y); this.TextureOffset = point; string tilesetName = reader.ReadString(); this.Tileset = layer.GetTileset(tilesetName); this.Width = reader.ReadInt32(); }
internal static OgmoLayer Read(ContentReader reader, OgmoLevel level) { OgmoLayer layer = null; string type = reader.ReadString(); switch (type) { case "g": layer = new OgmoGridLayer(reader, level); break; case "t": layer = new OgmoTileLayer(reader, level); break; case "o": layer = new OgmoObjectLayer(reader, level); break; } return layer; }
internal static OgmoLayer Read(ContentReader reader, OgmoLevel level) { OgmoLayer layer = null; string type = reader.ReadString(); switch (type) { case "g": layer = new OgmoGridLayer(reader, level); break; case "t": layer = new OgmoTileLayer(reader, level); break; case "o": layer = new OgmoObjectLayer(reader, level); break; } return(layer); }