/// <summary> /// Called if the scene is activated. /// </summary> public override void OnSceneActivated() { _blackBlend = new BlackBlend {IsEnabled = true, FadeIn = false}; #if AUDIO_ENABLED // AudioManager.Instance.Sound.Play(SGL.QueryResource<Sound>("menuMusic.mp3"), PlayMode.Loop); #endif }
/// <summary> /// Called if the scene is activated. /// </summary> public override void OnSceneActivated() { _entityComposer = new EntityComposer(); _scoreBoard = new Scoreboard(); _debugDisplay = new DebugDisplay(_entityComposer) {Visible = false}; _minimap = new Minimap(_entityComposer); _blackBlend = new BlackBlend {FadeIn = true}; //load achievements var xmlManager = new XmlManager<AchievementManager>(); try { _entityComposer.AchievementManager = xmlManager.Load(Path.Combine(Environment.CurrentDirectory, "achievements.xml")); } catch { _entityComposer.AchievementManager = new AchievementManager(); _entityComposer.AchievementManager.Achievements.Add(new EnemyDestroyedAchievement()); _entityComposer.AchievementManager.Achievements.Add(new ScoreAchievement()); _entityComposer.AchievementManager.Achievements.Add(new SustainAchievement()); _entityComposer.AchievementManager.Achievements.Add(new LasterTimeAchievement()); System.Diagnostics.Debug.WriteLine("Unable to load achievements."); } _achievementControl = new AchievementControl(UIManager); _achievementControl.Visible = false; _achievementsOpen = false; _achievementControl.AchievementManager = _entityComposer.AchievementManager; #if AUDIO_ENABLED //AudioManager.Instance.Sound.Play(SGL.QueryResource<Sound>("gameMusic.mp3"), PlayMode.Loop); #endif }
/// <summary> /// Initializes the scene. /// </summary> public override void Initialize() { _blackBlend = new BlackBlend {FadeIn = true, IsEnabled = true}; }
/// <summary> /// Called if the scene is activated. /// </summary> public override void OnSceneActivated() { _blackBlend = new BlackBlend {FadeIn = false, IsEnabled = true}; if (AchievementManager != null) { var xmlManager = new XmlManager<AchievementManager>(); xmlManager.Save(Path.Combine(Environment.CurrentDirectory, "achievements.xml"), AchievementManager); } }