Skip to content
Snippets Groups Projects
Commit 312c8eb7 authored by alexdevteam's avatar alexdevteam
Browse files

Update README

parent e9fdc8b8
No related branches found
No related tags found
No related merge requests found
......@@ -18,22 +18,12 @@ to the dependencies section of your Cargo.toml.
### Example
```rust
extern crate serialize;
extern crate tiled;
use std::fs::File;
use std::io::BufReader;
use std::path::Path;
use tiled::parse;
use tiled::map::Map;
fn main() {
let file = File::open("assets/tiled_base64_zlib.tmx").unwrap();
println!("Opened file");
let reader = BufReader::new(file);
let map = parse(reader).unwrap();
let map = Map::parse_file("assets/tiled_base64_zlib.tmx").unwrap();
println!("{:?}", map);
println!("{:?}", map.get_tileset_by_gid(22));
println!("{:?}", map.tileset_by_gid(22));
}
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment