Exemplo n.º 1
0
        public Game(Settings s)
        {
            Instance =this;
            Settings = s;
            Manager  = new Manager();

            //load data from the disk.
            Manager.EnumerateSaves ();
            Manager.EnumerateWorlds ();
        }
Exemplo n.º 2
0
        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 ();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
 public GUI(Settings s)
 {
     Interfaces.Add(State.States.INGAME, new InGame());
     Interfaces.Add(State.States.MENU, new MainMenu());
     //	Interfaces.Add(State.States.LOBBY, new Lobby());
 }
Exemplo n.º 5
0
 public static Game Join(Settings s )
 {
     return new Game( s);
 }
Exemplo n.º 6
0
 public static Game Create(Settings s)
 {
     return new Game( s);
 }