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
|
, jump = CoreKey.KEY_Z
|
||||||
, attack = CoreKey.KEY_X
|
, attack = CoreKey.KEY_X
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val () = InputState.setControls controls
|
||||||
in
|
in
|
||||||
helpLoop (shellState, GameType.initial controls)
|
helpLoop (shellState, GameType.initial controls)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ struct
|
|||||||
, jump = CoreKey.KEY_K
|
, jump = CoreKey.KEY_K
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun setControls controls = keyMappings := controls
|
||||||
|
|
||||||
(* global state detecting button inputs *)
|
(* global state detecting button inputs *)
|
||||||
val state =
|
val state =
|
||||||
{ leftHeld = ref false
|
{ leftHeld = ref false
|
||||||
|
|||||||
Reference in New Issue
Block a user