Merge pull request #260 from corwinkuiper/fix-sprite-example

Fix sprite example
This commit is contained in:
Corwin 2022-07-24 21:42:20 +01:00 committed by GitHub
commit 2df0481519
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,8 +48,8 @@ fn all_sprites(gfx: &ObjectController) {
for (i, obj) in objs.iter_mut().enumerate() { for (i, obj) in objs.iter_mut().enumerate() {
let this_image = (image + i * SPRITES.len() / objs_len) % SPRITES.len(); let this_image = (image + i * SPRITES.len() / objs_len) % SPRITES.len();
obj.set_sprite(gfx.sprite(&SPRITES[this_image])); obj.set_sprite(gfx.sprite(&SPRITES[this_image]));
gfx.commit();
} }
gfx.commit();
} }
} }
} }