yet another api rework, removal of integer types in public api, optionals at the end, some cleaning

This commit is contained in:
veclavtalica
2024-10-29 12:25:24 +03:00
parent 6464d14b3e
commit 9121da0675
30 changed files with 191 additions and 342 deletions

View File

@ -4,13 +4,22 @@ offset = { x = 0, y = 0 }
angle = 0
function game_tick()
rectangle {
draw.rectangle {
rect = { x = 0, y = 0, w = 640, h = 360 },
color = { r = 127, g = 0, b = 127, a = 255 },
}
sprite {
path = "/assets/title.png",
input.action {
name = "move_up",
control = input.CONTROL_L,
}
if input.action_pressed "move_up" then
draw.text { string = "BOO!" }
end
draw.sprite {
texture = "/assets/title.png",
rect = {
x = 320 - (320 / 2),
y = 180 - (128 / 2),
@ -19,7 +28,7 @@ function game_tick()
},
}
text {
draw.text {
string = "IT KEEPS HAPPENING",
position = offset,
font = "/fonts/kenney-pixel.ttf",