/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { #if WINDOWS ConsoleHelper.OpenConsole(); #endif _assetEngineService = new AssetEngineService(this); // Create storage _gameStorage = _assetEngineService.AssetEngine.CreateStorage(StorageName); Output.WriteLine(AssetMessages.StorageCreated, StorageName); // Create folder in storage _gameStorage.AddFolder(CustomAssetFolder); Output.WriteLine(AssetMessages.FolderCreated, CustomAssetFolder); /* * A loader must implement the IAssetLoader interface * When a loader is added to the engine, it is available for all storage * To add a new loader you have to call the AddLoader method of the AssetEngine : */ _assetEngineService.AssetEngine.AddLoader(new CustomAssetLoader()); Output.WriteLine(AssetMessages.AssetLoaderAdded, typeof(CustomAssetLoader)); base.Initialize(); }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { #if WINDOWS ConsoleHelper.OpenConsole(); #endif _assetEngineService = new AssetEngineService(this); _gameStorage = _assetEngineService.AssetEngine.CreateStorage(StorageName); Output.WriteLine(AssetMessages.StorageCreated, StorageName); _gameStorage.AddFolder(MeshFolder); Output.WriteLine(AssetMessages.FolderCreated, MeshFolder); base.Initialize(); }