private void Reinitialize() { snake = new Snake(); scoreTime = new TimeSpan(0, 0, 0); scoreY = 0f; highScore = null; CreateFood(); highScore = new HighScores(10); BackgroundMusic(meniuMusic); gameStage = GameStage.Meniu; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here //to be changed gameStage = GameStage.SplashScreen; gameType = GameStage.SinglePlayerWBorders; snake = new Snake(); food = null; rnd = new Random(); lastTime = new TimeSpan(0, 0, 3); bClickAvailable = false; volSfx = 1f; volBg = 1f; scoreY = 0f; bMovingScore = true; bTongueOut = false; actualName = ""; scoreTime = new TimeSpan(0, 0, 0); pauseTime = new TimeSpan(0, 0, 0); tongueTime = new TimeSpan(0, 0, 0); base.Initialize(); }