Beispiel #1
0
 public SchemaLoader(IGameEngineProxy gameEngine)
 {
     m_gameEngine = gameEngine;
     // set resolver to locate embedded .xsd file
     SchemaResolver = new ResourceStreamResolver(Assembly.GetExecutingAssembly(), "LevelEditor.schemas");
     Load("level_editor.xsd");
 }
Beispiel #2
0
 public SchemaLoader(IGameEngineProxy gameEngine)
 {
     m_gameEngine = gameEngine;
     // set resolver to locate embedded .xsd file
     SchemaResolver = new ResourceStreamResolver(Assembly.GetExecutingAssembly(), "LevelEditor.schemas");
     Load("level_editor.xsd");           
 }
Beispiel #3
0
        public ResourceListerCommandClient(IGameEngineProxy engineInfo)
        {
            if (engineInfo != null)
            {
                var modelType = engineInfo.Info.ResourceInfos.GetByType("Model");
                _modelFileExtensions = (modelType != null) ? modelType.FileExts : null;

                var bookmarkType = engineInfo.Info.ResourceInfos.GetByType("ModelBookmark");
                _modelBookmarkExtensions = (bookmarkType != null) ? bookmarkType.FileExts : null;
            }
            _modelFileExtensions     = _modelFileExtensions ?? System.Linq.Enumerable.Empty <string>();
            _modelBookmarkExtensions = _modelBookmarkExtensions ?? System.Linq.Enumerable.Empty <string>();
        }
Beispiel #4
0
 public ResourcePreview(IGameEngineProxy engineInfo)
 {
     if (engineInfo != null)
     {
         var modelType = engineInfo.Info.ResourceInfos.GetByType("Model");
         if (modelType != null)
         {
             _fileExtensions = modelType.FileExts;
         }
     }
     if (_fileExtensions == null)
     {
         _fileExtensions = System.Linq.Enumerable.Empty <string>();
     }
 }
Beispiel #5
0
        public SchemaLoader(IGameEngineProxy gameEngine)
        {
            m_gameEngine = gameEngine;

            var resolver = new MultiAssemblyResolver();
            var schemaSet = new XmlSchemaSet { XmlResolver = resolver };

            PrepareSchemaResource(schemaSet, resolver,
                Assembly.GetExecutingAssembly(),
                "LevelEditor.schemas", "level_editor.xsd");

            var xleSchema = LevelEditorXLE.Patches.GetSchemaResourceName();
            PrepareSchemaResource(schemaSet, resolver,
                Assembly.GetAssembly(typeof(LevelEditorXLE.Patches)),
                xleSchema.Item1, xleSchema.Item2);

            Load(schemaSet);
        }
Beispiel #6
0
        public SchemaLoader(IGameEngineProxy gameEngine)
        {
            m_gameEngine = gameEngine;

            var resolver  = new MultiAssemblyResolver();
            var schemaSet = new XmlSchemaSet {
                XmlResolver = resolver
            };

            PrepareSchemaResource(schemaSet, resolver,
                                  Assembly.GetExecutingAssembly(),
                                  "LevelEditor.schemas", "level_editor.xsd");

            var xleSchema = LevelEditorXLE.Patches.GetSchemaResourceName();

            PrepareSchemaResource(schemaSet, resolver,
                                  Assembly.GetAssembly(typeof(LevelEditorXLE.Patches)),
                                  xleSchema.Item1, xleSchema.Item2);

            Load(schemaSet);
        }