when play button is focused on title screen and either attack or jump button is pressed, start level

This commit is contained in:
2025-02-20 05:46:00 +00:00
parent f293e084f7
commit 6d39c17a11
6 changed files with 64 additions and 38 deletions

View File

@@ -2,5 +2,16 @@ structure TitleUpdate =
struct
open TitleType
fun update (titleState, input) = titleState
fun update (titleState, input: FrameInputType.t, userKeys) =
case #focus titleState of
START_BUTTON =>
let
val mode =
if #attackHeld input orelse #jumpHeld input then
GameType.LEVEL LevelType.initial
else
GameType.TITLE titleState
in
{mode = mode, userKeys = userKeys}
end
end