- LevelCollection class manages a single LevelData class.
- LevelData class can hold all the game objects in the current scene.
- LevelCollection has control over Loading/Unloading (a particular scene) and XML LoadFromFile/SaveToFile methods (managing positions, rotations and scaling)
All the content is now being managed using Dictionaries. This provides great control over used and unused assets. In the current implementation a method is fired containing all the data of a particular scene. The current assets are compared with the assets required for the next scene. Unused data is unloaded. The remaining asset data is assigned to the proper game object.
That may sound either very straightforward or maybe you've completely lost it by now... Here's a quick summary:
LevelCollection.Load(*levelnametoload*) will know which scene you want to load, and will clear all current data present in the scene and loads all the new scene data as well as comparing current with new assets (models, textures etc.) to check if any new assets need to be loaded and if unused assets need to be unloaded to free memory.
When you're scene is loaded and visible on screen, you can either play it or start messing around with the positions. Changing a Position or Rotation will require LevelCollection.SaveToFile(*filename*) to persist after quiting the game.
I'd like to show a video about this very soon...So stay tuned!
Update: Video available HERE