public ProjectConfiguration GetConfiguration() { var configuration = new ProjectConfiguration { GameAssemblies = Entities.Select( e => Path.GetFullPath( e.Assembly.Location ) ).Distinct(), GameContent = ContentDirectories.Select( dir => dir.FullName ), GameLevels = Levels.Select( l => l.FilePath ) }; return configuration; }
private void Load( ProjectConfiguration configuration ) { if( configuration != null ) { LoadEntitiesFromAssemblies( configuration.GameAssemblies ); // must load content _before_ we attempt to load the levels! LoadContentDirectories( configuration.GameContent ); LoadLevels( configuration.GameLevels ); } }
public Project(ProjectConfiguration configuration = null) { Load(configuration); }
public Project( ProjectConfiguration configuration = null ) { Load( configuration ); }
private void ReadProject( string fileName ) { var config = new ProjectConfiguration(); // user chose a file CurrentProjectFile = fileName; // open the ProjectConfiguration var projectConfiguration = DiskStorage.LoadFromDisk<ProjectConfiguration>( fileName ); if( projectConfiguration != null ) { Project = new Project( projectConfiguration ); UpdateUserInterface(); } }
private void CreateProjectFile() { var projectConfiguration = new ProjectConfiguration(); Project = new Project(projectConfiguration); CurrentProjectFile = null; }