コード例 #1
0
        public gameEditorMainForm()
        {
            InitializeComponent();

            Map map = new Map(@"P:\Code\Git\EntityEngine\Maps\Testing");
            var assetts0 = map.GetAssetsFromHierarchy("generic");
            var assetts1 = map.GetAssetsFromHierarchy("instruments.guitar");
            var assetts2 = map.GetAssetsFromHierarchy("instruments");
            var assetts3 = map.GetAssetsFromHierarchy("generic", AssetType.Model);
            var assetts4 = map.GetAssetsFromHierarchy("generic", AssetType.Shader);
            var assetts5 = map.GetAssetsFromHierarchy("generic", AssetType.Component);

            AssetNode hNode = map.HierarchyNodes;
            this.hierarchyTreeView.Nodes.Add(hNode.name);
            TreeNode root = this.hierarchyTreeView.Nodes[0];
            this.TreeViewTabs.TabPages[0].Text = root.Text;
            foreach (AssetNode node in hNode.children)
                root.PopulateWithAssettNodes(node, root);

            hNode = map.TypeNodes;
            this.typeTreeView.Nodes.Add(hNode.name);
            root = this.typeTreeView.Nodes[0];
            this.TreeViewTabs.TabPages[1].Text = root.Text;
            foreach (AssetNode node in hNode.children)
                root.PopulateWithAssettNodes(node, root);
        }
コード例 #2
0
 public void LoadAssets(Map map)
 {
     _map = map;
     foreach (var asset in map.AssetsOfType[AssetType.Component])
     {
         if (!_assets.Keys.Contains(asset.Extension))
             _assets.Add(asset.Extension, new List<Asset>());
         _assets[asset.Extension].Add(asset);
     }
     foreach (var asset in map.AssetsOfType[AssetType.Entity])
         _assets["Entity"].Add(asset);
 }