MonoGameProgram<'Model, 'Msg> Type
MonoGame-specific wrapper around a Core Program, carrying device-level configuration that the backend-neutral Core type cannot hold.
Build one with MonoGameProgram.ofProgram, add MonoGame-specific configuration with MonoGameProgram.withConfig and/or MonoGameProgram.withInputMapper, then pass the result to MiboGame.
Example
let program =
Program.mkProgram init update
|> Program.withConfig(fun cfg ->
{ cfg with Width = 1280; Height = 720; Title = "My Game" })
|> Program.withInput
|> Program.withTick Tick
let mgProgram =
program
|> MonoGameProgram.ofProgram
|> MonoGameProgram.withConfig(fun (game, graphics) ->
graphics.SynchronizeWithVerticalRetrace <- false)
use game = new MiboGame<_, _>(mgProgram)
game.Run()
val program: obj
val mgProgram: obj
val game: obj
Record fields
| Record Field |
Description
|
|
Device-level configuration callbacks invoked in the
MiboGame constructor, after the Core
Program.Config callbacks and before
|
The backend-neutral Core program.
|
Mibo