when game is first loaded, assign parsed controls (or at least default controls) to imperative shell's state
This commit is contained in:
@@ -278,6 +278,8 @@ struct
|
||||
, jump = CoreKey.KEY_Z
|
||||
, attack = CoreKey.KEY_X
|
||||
}
|
||||
|
||||
val () = InputState.setControls controls
|
||||
in
|
||||
helpLoop (shellState, GameType.initial controls)
|
||||
end
|
||||
|
||||
@@ -9,6 +9,8 @@ struct
|
||||
, jump = CoreKey.KEY_K
|
||||
}
|
||||
|
||||
fun setControls controls = keyMappings := controls
|
||||
|
||||
(* global state detecting button inputs *)
|
||||
val state =
|
||||
{ leftHeld = ref false
|
||||
|
||||
Reference in New Issue
Block a user