示例#1
0
        /// <summary>
        ///		Loads default resource configuration if one exists.
        /// </summary>
        protected static void SetupResources()
        {
            string resourceConfigPath = Path.GetFullPath( EngineConfigFile );

            if( File.Exists( resourceConfigPath ) )
            {
                EngineConfig config = new EngineConfig();

                // load the config file
                // relative from the location of debug and releases executables
                config.ReadXml( EngineConfigFile );

                // interrogate the available resource paths
                foreach( EngineConfig.FilePathRow row in config.FilePath )
                {
                    ResourceManager.AddCommonArchive( row.src, row.type );
                }
            }
        }
示例#2
0
        protected void SetupResources()
        {
            EngineConfig config = new EngineConfig();

            // load the config file
            // relative from the location of debug and releases executables
            config.ReadXml("EngineConfig.xml");

            // interrogate the available resource paths
            foreach (EngineConfig.FilePathRow row in config.FilePath)
            {
                string fullPath = Environment.CurrentDirectory + Path.DirectorySeparatorChar + row.src;

                ResourceManager.AddCommonArchive(fullPath, row.type);
            }
        }