Load will load the tmx file and any other image resources that are needed
(url string, data io.Reader)
| 32 | |
| 33 | // Load will load the tmx file and any other image resources that are needed |
| 34 | func (t *tmxLoader) Load(url string, data io.Reader) error { |
| 35 | lvl, err := createLevelFromTmx(data, url, t.root) |
| 36 | if err != nil { |
| 37 | return err |
| 38 | } |
| 39 | |
| 40 | t.levels[url] = TMXResource{Level: lvl, url: url} |
| 41 | return nil |
| 42 | } |
| 43 | |
| 44 | // Unload removes the preloaded level from the cache |
| 45 | func (t *tmxLoader) Unload(url string) error { |
nothing calls this directly
no test coverage detected