public override void LoadContent() { base.LoadContent(); SoundManager.Instance.LoadContent(); ///The player class variables gets stored in a defferent class /// Two different xml loader for 2 kinds of xml classes XmlManager<Loader.parameter> playerloader = new XmlManager<Loader.parameter>(); XmlManager<map> mapLoader = new XmlManager<map>(); //loadedparams = paramloader.Load("Content/Gameplay/Explosion/parameters.xml"); //player loader is the xml manager instance for manual created xml playerparameters = playerloader.Load("Content/Gameplay/Player.xml"); enemygreenbulletparameter = playerloader.Load("Content/Gameplay/Enemy/Enemyweapons.xml");//Enemybullets playerbulletparameter = playerloader.Load("Content/Gameplay/Playergadgets.xml");//bullet animatedparameter = playerloader.Load("Content/Gameplay/Animatedgraphics.xml"); smallexplosion = playerloader.Load("Content/Gameplay/Smallexplotion.xml"); //use map loader for xml created in Tiled.exe tilesandenemies = mapLoader.Load("Content/Gameplay/Map/doodle_ink.xml"); //playerbulletparam has set shorthand BulletHandler.Instance.Playerbulletparam = playerbulletparameter;//instance BulletHandler.Instance.Enemygreenbulletparam = enemygreenbulletparameter;//instance BulletHandler.Instance.Animatedgraphicsparam = animatedparameter;//instance BulletHandler.Instance.Addloaderparameter(smallexplosion); LoadTilesandEnemies();//Load player //Load all images and sounds tilesandenemies.LoadContent(); player.LoadContent(); }
public override void UnloadContent() { base.UnloadContent(); player.UnloadContent(); tilesandenemies.UnloadContent(); ScoreManager.Instance.ResetValues(); BulletHandler.Instance.ResetValues(); SoundManager.Instance.UnloadContent(); player = null; tilesandenemies = null; }