twn_audio: rework interface

This commit is contained in:
2024-10-07 15:21:44 +03:00
parent cc1e64531c
commit ae8cc5f50b
5 changed files with 96 additions and 94 deletions

View File

@ -1,31 +0,0 @@
ORIGIN = { x = 320, y = 180 }
RADIUS = 48
offset = { x = 0, y = 0 }
angle = 0
function game_tick()
rectangle {
rect = { x = 0, y = 0, w = 640, h = 360 },
color = { r = 127, g = 0, b = 127, a = 255 },
}
sprite {
path = "/assets/title.png",
rect = {
x = 320 - (320 / 2),
y = 180 - (128 / 2),
w = 320,
h = 128,
},
}
text {
string = "IT KEEPS HAPPENING",
position = offset,
font = "/fonts/kenney-pixel.ttf",
}
offset.x = ORIGIN.x + (math.cos(angle) * RADIUS)
offset.y = ORIGIN.y + (math.sin(angle) * RADIUS)
angle = angle + 0.1
end