case LevelState.Started: break; case LevelState.InProcess: break; case LevelState.Fault: break; case LevelState.Success: break; case LevelState.FinishedOk: break; case LevelState.FinishedFail: break; default: break; } base.Update(gameTime); } Replace the case with the following code snippet: “Ready” C# delayPeriod += gameTime.ElapsedGameTime; if (delayPeriod >= delayFlashOn) { // Initiate flashing sequence currentSequenceItem = //TODO #5 CurrentState = LevelState.Flashing; delayPeriod = TimeSpan.Zero; flashOn = true; } break; Note: By a specific case, we mean to use the snippet as its implementation, and “replacing” not to delete the case statement (in the above step, the snippet should still be preceded by the line LevelState.Ready:”. “case Replace the case with the following code snippet: “Flashing” C# // Display the level's move set. When done, start accepting // user input delayPeriod += gameTime.ElapsedGameTime; if ((delayPeriod >= delayFlashOn) && (flashOn)) { delayPeriod = TimeSpan.Zero; flashOn = false; }
case LevelState.Started: break; case LevelState.InProcess: break; case LevelState.Fault: break; case LevelState.Success: break; case LevelState.FinishedOk: break; case LevelState.FinishedFail: break; default: break; } base.Update(gameTime); } Replace the “Ready” case with the following code snippet: C# delayPeriod += gameTime.ElapsedGameTime; if (delayPeriod >= delayFlashOn) { // Initiate flashing sequence currentSequenceItem = //TODO #5 CurrentState = LevelState.Flashing; delayPeriod = TimeSpan.Zero; flashOn = true; } break; Note: By “replacing” a specific case, we mean to use the snippet as its implementation, and not to delete the case statement (in the above step, the snippet should still be preceded by the line “case LevelState.Ready:”. Replace the “Flashing” case with the following code snippet: C# // Display the level's move set. When done, start accepting // user input delayPeriod += gameTime.ElapsedGameTime; if ((delayPeriod >= delayFlashOn) && (flashOn)) { delayPeriod = TimeSpan.Zero; flashOn = false; }
MultitouchGameDevelopmentWithXNA.docx