(fixes) test-projects main have to run
This commit is contained in:
@@ -4,20 +4,27 @@ import { Log } from @sdk:log;
|
||||
import { Input } from @sdk:input;
|
||||
import { Gfx } from @sdk:gfx;
|
||||
|
||||
declare global frame_counter: int = 0;
|
||||
declare global tile_id: int = 0;
|
||||
declare const MAX_FRAMES: int = 4;
|
||||
|
||||
[Frame]
|
||||
fn frame() -> void
|
||||
{
|
||||
let touch = Input.touch();
|
||||
let tile_id = 0;
|
||||
let hold = 0;
|
||||
let counter = 0;
|
||||
|
||||
if (touch.button().released())
|
||||
{
|
||||
frame_counter = 0;
|
||||
tile_id = 0;
|
||||
}
|
||||
|
||||
if (touch.button().down())
|
||||
{
|
||||
hold = touch.button().hold() / 6;
|
||||
while (counter < hold)
|
||||
frame_counter = frame_counter + 1;
|
||||
if (frame_counter > MAX_FRAMES)
|
||||
{
|
||||
counter = counter + 1;
|
||||
frame_counter = 0;
|
||||
tile_id = tile_id + 1;
|
||||
if (tile_id > 7)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user