示例#1
0
 protected void SetNewScoreState(ScoreState scoreState)
 {
     LevelCount = scoreState.LevelCount;
     SkipCount = scoreState.SkipCount;
     DeathCount = scoreState.DeathCount;
     FinalScore = scoreState.FinalScore;
 }
示例#2
0
        /// <summary>
        /// Add a ScoreState to the CommandHistory list. 
        /// When adding a ScoreState, remove all remaining commands paste the CommandIndex (i.e. remove all the redos)
        /// </summary>
        /// <param name="scoreState">The ScoreState to add</param>
        protected void AddScoreStateToHistory(ScoreState scoreState)
        {
            // When adding a new Command, remove every command paste the current
            if (CommandIndex < CommandHistory.Count - 1)
            {
                CommandHistory.RemoveRange(CommandIndex + 1, CommandHistory.Count - 1 - CommandIndex);
            }
            CommandHistory.Add(scoreState);
            CommandIndex++;

            rétablirToolStripMenuItem.Enabled = false;
            annulerToolStripMenuItem.Enabled = true;
        }