public void BuildGame(Project project, string loc) { FileStream stream = File.OpenWrite(loc); BinaryOutput output = new BinaryOutput(stream); output.Write(project.World.TilesetContainer.Count); foreach (Tileset t in project.World.TilesetContainer) { output.Write(t); } output.Write(project.World.EntityContainer.All().Count); foreach (EntityTemplate e in project.World.EntityContainer.All()) { output.Write(e); } }
public void LoadProject(string loc, Project proj) { GameLocation = loc; EnableRegionControls(true); lMaps.Nodes[0].Text = EditorEngine.Instance.World.Name; this.Text = EditorEngine.Instance.World.Name + " - " + WindowTitle; foreach (TreeNode node in proj.RootNode.Nodes) { lMaps.Nodes[0].Nodes.Add(node); if (node.Tag is Map) { EditorEngine.Instance.World.Maps.Add(node.Tag as Map); } } }