Example #1
0
        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;
        }
Example #2
0
        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 );
            }
        }
Example #3
0
 public Project(ProjectConfiguration configuration = null)
 {
     Load(configuration);
 }
Example #4
0
 public Project( ProjectConfiguration configuration = null ) {
     Load( configuration );
 }
Example #5
0
        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();
            }
        }
Example #6
0
        private void CreateProjectFile()
        {
            var projectConfiguration = new ProjectConfiguration();

            Project = new Project(projectConfiguration);

            CurrentProjectFile = null;
        }