Don't destroy ordering information in conv.ConvertObjects

This commit is contained in:
2018-12-30 23:22:01 +00:00
parent 6f3ed56b99
commit c441851a9b
3 changed files with 15 additions and 5 deletions

View File

@@ -87,7 +87,7 @@ func main() {
env := &env{
gameMap: gameMap,
set: mapSet,
objects: objects,
objects: conv.MapByName(objects),
batch: batch,
}

View File

@@ -69,7 +69,7 @@ func main() {
objects, spritesheet := conv.ConvertObjects(rawObjs)
batch := pixel.NewBatch(&pixel.TrianglesData{}, spritesheet)
env := &env{objects: objects, set: mapSet, batch: batch}
env := &env{objects: conv.MapByName(objects), set: mapSet, batch: batch}
// The main thread now belongs to pixelgl
pixelgl.Run(env.run)