Example #1
0
        public void run(string[] args)
        {
            // Initialize engine
            Engine.Initialize(new GameInfo("dragonhoard", "0.0.1", "libascii test", "dragonhoard"), args);

            // Initialize important, global systems
            EntityManager.Initialize();
            TerrainTypeManager.Initialize();


            Renderer.IsBatchMode = false;

            CurrentScene = new MapScene();//TestScene();//GUIExampleScene();

            while (!RenderContext.shouldClose())
            {
                Input.Begin();
                CurrentScene.update(updateTimer());
                Input.End();

                RenderContext.beginFrame();
                Screen.Clear();
                CurrentScene.render();
                Renderer.render();
                RenderContext.endFrame();
            }

            Engine.Deinitialize();
        }
Example #2
0
        public TerrainType this[string level, int x, int y]
        {
            get
            {
                string s = "";

                if (x < 2 || x >= 18)
                {
                    s = "test_wall";
                }
                else if (y < 2 || y >= 18)
                {
                    s = "test_wall";
                }
                else
                {
                    s = "test_floor";
                }

                return(TerrainTypeManager.GetType(s));
            }
            set
            {
            }
        }