//--------------------------------------------------------------------------------------------------------------------------------------------------- // // Copyright (C)2007 DarkWynter Studios. All rights reserved. // //--------------------------------------------------------------------------------------------------------------------------------------------------- // {Contact : darkwynter.com for licensing information //--------------------------------------------------------------------------------------------------------------------------------------------------- namespace DarkWynter.EventSystem.EventTypes { using System; using System.Collections.Generic; using System.Diagnostics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System.Text; using System.Xml; using NoName; using NoName.Statics; /// /// Instance of the LevelChangeEvent /// Extends GameEvent /// Used to signal that a change in the level is needed /// public class LevelChangeEvent : GameEvent { public int nextLevel { get { return _nextLevel; } set { _nextLevel = value; } } public int _nextLevel; public LevelChangeEvent(XmlNode node) :base(node) { if (node.Attributes["nextLevel"] != null) { this.nextLevel = int.Parse(node.Attributes["nextLevel"].Value); } else { this.nextLevel = 0; } } /// /// Changes the level the game is on /// public override void FireEvent() { { NoName.Statics.Globals.LEVEL_INDEX = this.nextLevel; //if (this.nextLevel != -4332) //{ // NoNameMain._self.changeLevel(); //} //else //{ // Logging.writeG2LLog(Globals.studentIDNumber + "-G2Llog.txt", // DarkWynter.Engine.Utilities.Logging.G2LLogList // ); // Logging.writeG2LLog(Globals.studentIDNumber + "-G2LPositionallog.txt", // DarkWynter.Engine.Utilities.Logging.G2LPositionalLog // ); //} //this.isFinished = true; } } } }