public static void Main(string[] args) { Console.WriteLine (String.Format ("Init BEATDOWN version:{0}", System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version)); CheckforFonts (); Settings s = new Settings (); /// IConnection connection = Connection.GetControlConnection (); // connection.Send (new TestMessage ()); using (Game.Game g = new Game.Game(s)){//connection.CreateGame("A Winner Is You", s)) { using (Renderer.Render renderer = new Renderer.Render(ref g, ref s)){ renderer.Run (30.0); } } Console.WriteLine ("exiting and saving"); s.SaveConfig (); }
public Render(ref Game.Game g, ref Settings s) : base(s.GraphicsX, s.GraphicsY, OpenTK.Graphics.GraphicsMode.Default, "Raven") { theGame = g; settings = s; //in case some one else wants to acess this bit.Untitled event Instance = this; //bind events to the input handler. Mouse.ButtonUp += InputHandler.OnMouseUp; Mouse.ButtonDown += InputHandler.OnMouseDown; Mouse.WheelChanged += InputHandler.OnMouseWheeled; Keyboard.KeyDown+= InputHandler.OnKeyDown; Keyboard.KeyUp+=InputHandler.OnKeyUp; //setup vertex buttfer objects. heh BaseRender.Init(); UnitRenderer.Init(); }