Simplify debug test case

This commit is contained in:
kayomn 2023-05-23 23:22:29 +00:00
parent 181c44d85f
commit b94e03f829
2 changed files with 6 additions and 22 deletions

6
debug/app.ona Normal file
View File

@ -0,0 +1,6 @@
return {
title = "Afterglow",
width = 1280,
height = 800,
}

View File

@ -1,22 +0,0 @@
delta_time = @events.delta_time()
player_sprite = @canvas.create_sprite {
atlas = @import("./player.bmp"),
viewport = @rect(0, 0, 0.1, 0.1),
bounds = @rect(0, 0, 0.05, 0.05)
}
@input.on_axis2d("move", => (axes) {
player_sprite.position = player_sprite.position + (axes * delta_time)
})
@input.on_axis2d("look", => (axes) {
player_sprite.rotation = @atan2(axes.y, axes.x);
})
return {
title = "Demo",
width = 640,
height = 480,
}