-
Notifications
You must be signed in to change notification settings - Fork 7
/
Game1.fs
50 lines (29 loc) · 1.27 KB
/
Game1.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module Game
open Microsoft.Xna.Framework
open Microsoft.Xna.Framework.Graphics
open Microsoft.Xna.Framework.Content
type Game1 () as x =
inherit Game()
do x.Content.RootDirectory <- "Content"
let graphics = new GraphicsDeviceManager(x)
let mutable spriteBatch = Unchecked.defaultof<SpriteBatch>
override x.Initialize() =
spriteBatch <- new SpriteBatch(x.GraphicsDevice)
base.Initialize()
// TODO: Add your initialization logic here
()
override this.LoadContent() =
// TODO: use x.Content to load your game content here
// On Windows you can load any PNG file directly as Texture2D
// Read more about MonoGame's Content Pipeline: https://docs.monogame.net/articles/tools/mgcb_editor.html
// or install it with package manager console: [dotnet tool install -g dotnet-mgcb-editor]
()
override this.Update (gameTime) =
// TODO: Add your update logic here
base.Update(gameTime)
()
override this.Draw (gameTime) =
x.GraphicsDevice.Clear Color.CornflowerBlue
// TODO: Add your drawing code here
base.Draw(gameTime)
()