Created
July 25, 2012 02:27
-
-
Save carlosrivera/3174012 to your computer and use it in GitHub Desktop.
F# and XNA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#light | |
#I @"C:\Program Files\XNA\v2.0\References\Windows\x86" | |
#r "Microsoft.Xna.Framework.dll" | |
#r "Microsoft.Xna.Framework.Game.dll" | |
open Microsoft.Xna.Framework | |
open Microsoft.Xna.Framework.Graphics | |
open System | |
type XNAGame = class | |
inherit Game as base | |
val mutable graphics : GraphicsDeviceManager | |
new() as this = | |
{ | |
graphics = null | |
} | |
then | |
this.graphics <- new GraphicsDeviceManager(this) | |
override this.Draw(gameTime) = | |
let gd = this.graphics.GraphicsDevice | |
gd.Clear(Color.CornflowerBlue) | |
end | |
let Main() = | |
let game = new XNAGame() | |
game.Run() | |
[<STAThread>] | |
do Main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment