4
0

rename partial files
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-12-10 23:16:39 +01:00
parent cb95285c2a
commit fc398d0f65
20 changed files with 19 additions and 19 deletions

23
inc/actions.menu.lua Normal file
View File

@@ -0,0 +1,23 @@
--------------------------------------------------------------------------------
-- Menu Actions
--------------------------------------------------------------------------------
function MenuActions.play()
-- Reset player state and screen for a new game
Context.player.x = Config.player.start_x
Context.player.y = Config.player.start_y
Context.player.vx = 0
Context.player.vy = 0
Context.player.jumps = 0
Context.current_screen = 1
GameWindow.set_state(WINDOW_GAME)
end
function MenuActions.exit()
exit()
end
-- Initialize menu items after actions are defined
Context.menu_items = {
{label = "Play", action = MenuActions.play},
{label = "Exit", action = MenuActions.exit}
}