/// <summary> /// Resets this instance. This will be called when a new game is played. Reset all of /// your objects here so that you do not need to reallocate the memory for them. /// </summary> internal override void Reset() { base.Reset(); currentLevel = 0; scoreKeeper = new ScoreKeeper(true); previousGameTime = GameClock.Now; fantastica = new World(Vector2.Zero); Physics.Settings.MaxPolygonVertices = 30; // Defaults to 8? What are we, running on a TI-83 or something? Physics.Settings.EnableDiagnostics = false; Battle.nextAllies = ""; this.sprWorld = new SPRWorld(fantastica, currentLevel); this.gameOverTime = GameClock.Now + 10000000 * 10; // 10 Seconds. }
// </DEBUG!!> /// <summary> /// Initializes a new instance of the <see cref="StupidGameScreen"/> class. /// </summary> /// <param name="scoreboardIndex">The game-specific index into the scoreboard.</param> public SPRGameScreen(int scoreboardIndex) : base(scoreboardIndex) { this.m_scoreboardIndex = scoreboardIndex; currentLevel = 0; scoreKeeper = new ScoreKeeper(true); previousGameTime = GameClock.Now; fantastica = new World(Vector2.Zero); Physics.Settings.MaxPolygonVertices = 30; // Defaults to 8? What are we, running on a TI-83 or something? Physics.Settings.EnableDiagnostics = false; this.sprWorld = new SPRWorld(fantastica, currentLevel); // Always call reset at the end of the constructor! this.Reset(); }