summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go
index 44e0170..84ea5b8 100644
--- a/main.go
+++ b/main.go
@@ -423,7 +423,8 @@ func (g *Game) Update() error {
}
func (g *Game) UpdatePlacing() {
- for _, obj := range g.objects {
+ for i := len(g.objects)-1; i >= 0; i-- {
+ obj := g.objects[i]
obj.Update(*g.tilemap, g.objects)
if obj.y > screenHeight {
g.toPlace = append(g.toPlace, obj)