-
-
Notifications
You must be signed in to change notification settings - Fork 156
/
Copy pathProgram.fs
26 lines (19 loc) · 946 Bytes
/
Program.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
namespace JumpBox
open System
open System.IO
open Nu
module Program =
// this the entry point for your Nu application
let [<EntryPoint; STAThread>] main _ =
// point current working directory at program's base directory
Directory.SetCurrentDirectory AppContext.BaseDirectory
// initialize Nu
Nu.init ()
// this specifies the window configuration used to display the game
let sdlWindowConfig = { SdlWindowConfig.defaultConfig with WindowTitle = "My Game" }
// this specifies the configuration of the game engine's use of SDL
let sdlConfig = { SdlConfig.defaultConfig with WindowConfig = sdlWindowConfig }
// this specifies the world config using the above SDL config
let worldConfig = { WorldConfig.defaultConfig with SdlConfig = sdlConfig }
// run the engine with the given config and plugin
World.run worldConfig (JumpBoxPlugin ())