public void StartNewGame(String pLevel)
 {
     LevelScene _level = (LevelScene)SceneList["Level"];
     //stops the game from crashing if the level files do not exist
     String test = Environment.CurrentDirectory + @"\Content\Levels\" + pLevel;
     if(File.Exists(Environment.CurrentDirectory + @"\Content\Levels\" + pLevel))
     {
         _level.StartNewGame(Environment.CurrentDirectory + @"\Content\Levels\" + pLevel);
         lastScene = currentScene;
         currentScene = _level;
         currentScene.isActiv = true;
         lastScene.isActiv = false;
     }
 }
        public void SetCurrentScene(string pString)
        {
            
            if (SceneList.ContainsKey(pString))
            {
                lastScene = currentScene;
                currentScene = SceneList[pString];
                currentScene.isActiv = true;
                if(lastScene != null)
                    lastScene.isActiv = false;
                if(currentScene.GetType() == typeof(CreditsScene))
                {
                    CreditsScene cs = (CreditsScene)currentScene;
                    cs.StartCredits();
                }
            }
            else
                return;

            if (lastScene != null)
            {
                if (pString.Equals("Editor"))
                    ChangeResolution(1600, 920,0);
                else if (lastScene.Name.Equals("Editor"))
                    ChangeResolution(1280, 720,1);
            }

            if(lastScene != null)
                if (lastScene.Name.Equals("Level"))
                    HMediaPlayer.Instance.StartBackgroundMusic();
        }
 public void Add(Scene pScene)
 {
     SceneList.Add(pScene.Name, pScene);
 }