/// <summary> /// Loads all models currently queued for loading /// </summary> #endregion public void LoadModels() { // loop until disposing while (!Disposing && !IsDisposed) { while (mModelsToLoad.Count > 0) { // Load the next model string modelToLoad = mModelsToLoad.Dequeue(); SetStatus("Loading \"" + System.IO.Path.GetFileName(modelToLoad) + "\"..."); // Load the model from disk Model xnaModel = FlatRedBallServices.LoadModelFromFile( modelToLoad, "Global"); // When loaded, add to model manager PositionedModel model = ModelManager.AddModel(xnaModel); // Report the successful load string modelName = System.IO.Path.GetFileNameWithoutExtension(modelToLoad); ModelLoaded(modelName, model); SetStatus(String.Empty); } } }