Exemplo n.º 1
0
        protected override void OnLoad(EventArgs e)
        {
            Logger.Debug("Called OnLoad();");
            base.Title = "DynaEngine Sample Game";

            //Init User Interface Controller
            Logger.Debug("Register GUI Controller");
            InputDevice = new InputDevice(Mouse, Keyboard);
            UiController = new GuiController(this);

            //Texture Manager
            TextureManager = new TextureController(this);
            //SoundManager = new SoundManager(this);

            resize(null, EventArgs.Empty);

            //Enable OpenGL Modes
            GL.Enable(EnableCap.DepthTest);
            GL.Enable(EnableCap.Texture2D);
            GL.ClearColor(Color.Gray);
        }
Exemplo n.º 2
0
 public void loadXml(XmlDocument doc, TextureController textureController)
 {
     RoomParser parser = new RoomParser(doc, textureController);
     List<Block> blocks = parser.getBlocks();
     foreach (Block block in blocks)
     {
         int x = (int) block.Position.x;
         int y = (int) block.Position.y;
         int z = (int) block.Position.z;
         _blocks[x, y, z] = block;
     }
 }
Exemplo n.º 3
0
        public RoomParser(XmlDocument doc, TextureController textureController)
        {
            _doc = doc;
            _textureController = textureController;

            loadModels();
            loadObjects();
        }
Exemplo n.º 4
0
 public void loadXml(string filePath, TextureController textureController)
 {
     XmlDocument doc = new XmlDocument();
     doc.Load(filePath);
     loadXml(doc, textureController);
 }