examples/sprites: Update only shown sprites

This commit is contained in:
Hajime Hoshi 2018-06-17 22:05:34 +09:00
parent 12287a8382
commit 5680ce7f46

View File

@ -79,8 +79,8 @@ type Sprites struct {
}
func (s *Sprites) Update() {
for _, sprite := range s.sprites {
sprite.Update()
for i := 0; i < s.num; i++ {
s.sprites[i].Update()
}
}