diff --git a/test-projects/main/cartridge/program.pbx b/test-projects/main/cartridge/program.pbx index 54f5ebd5..438842ce 100644 Binary files a/test-projects/main/cartridge/program.pbx and b/test-projects/main/cartridge/program.pbx differ diff --git a/test-projects/main/src/main.pbs b/test-projects/main/src/main.pbs index ae76617c..cfbf01bc 100644 --- a/test-projects/main/src/main.pbs +++ b/test-projects/main/src/main.pbs @@ -7,10 +7,28 @@ import { Gfx } from @sdk:gfx; fn frame() -> void { let touch = Input.touch(); + let tile_id = 0; + let hold = 0; + let counter = 0; + + if (touch.button().down()) + { + hold = touch.button().hold() / 6; + while (counter < hold) + { + counter = counter + 1; + tile_id = tile_id + 1; + if (tile_id > 7) + { + tile_id = 0; + } + } + } Gfx.clear(new Color(6577)); // Gfx.draw_square(touch.x(), touch.y(), 16, 16, new Color(65535), new Color(13271)); - let sprite_status = Gfx.set_sprite(0, 0, touch.x(), touch.y(), 0, 0, true, false, false, 0); + let sprite_status = Gfx.set_sprite(0, 0, touch.x() - 16, touch.y() + 8, tile_id, 0, true, true, false, 0); + let sprite_status2 = Gfx.set_sprite(0, 1, touch.x() + 16, touch.y() + 8, tile_id, 0, true, false, false, 0); let a = 10; let b = 15;