public void Respawn() { state = new RightIdleTS(this); physState = new VVVVVVGroundState(this, 1); gravityDirection = 1; position = Game1.GetInstance().level.checkpoint; }
public void Update(GameTime gameTime) { game.gameHUD.Update(gameTime); if (walkTimer > 0) { if (slowFrames >= ValueHolder.slowdownRate) { right.Execute(); game.level.Update(gameTime); slowFrames = 0; } slowFrames *= 2; } else { game.level.mario.MakeVictoryTeno(); if (walkTimer < -70) { Game1.GetInstance().level = new Level(StringHolder.levelOne); Game1.GetInstance().background.CurrentSprite = Game1.GetInstance().background.OverworldSprite; Game1.GetInstance().gameState = new TitleScreenGameState(); Game1.GetInstance().isTitle = true; Game1.GetInstance().gameHUD.Coins = 0; Game1.GetInstance().gameHUD.Lives = 3; Game1.GetInstance().gameHUD.Score = 0; } } walkTimer--; if (game.gameHUD.Time > 0) { game.gameHUD.Time--; game.gameHUD.Score += ValueHolder.remainingTimePoints; } }
public PauseGameState() { game = Game1.GetInstance(); game.isPaused = true; game.keyboardController = new PauseMenuKeyController(); //SoundManager.pause.Play(); game.gameHUD.PausedCheck = true; }
public DeadGameState(Teno mario) { game = Game1.GetInstance(); this.teno = mario; //SoundManager.StopMusic(); //SoundManager.death.Play(); teno.isDead = true; }
public DeadTeno(Teno teno) { ISpriteFactory factory = new SpriteFactory(); Sprite = factory.build(SpriteFactory.sprites.deadTeno); this.teno = teno; Game1.GetInstance().gameState = new DeadGameState(teno); }
public TenoGameState() { game = Game1.GetInstance(); game.keyboardController = new KeyboardController(game.level.mario); game.gameHUD.PausedCheck = false; game.gameHUD.gameEnded = false; game.isVVVVVV = false; game.isVictory = false; }
public LivesScreenGameState() { game = Game1.GetInstance(); game.gameHUD.Lives--; font = game.Content.Load <SpriteFont>(StringHolder.bigTextFont); game.keyboardController = new PauseMenuKeyController(); game.gameHUD.Time = ValueHolder.startingTime; game.gameHUD.textColor = ValueHolder.blackScreenText; }
public VictoryGameState() { game = Game1.GetInstance(); game.isVictory = true; //SoundManager.StopMusic(); //SoundManager.clear.Play(); right = new RightCommand(game.level.teno); game.gameHUD.gameEnded = true; game.ach.AchievementAdjustment(AchievementsManager.AchievementType.Level); }
public VVVVVVGameState() { game = Game1.GetInstance(); game.level.mario.physState = new VVVVVVGroundState(game.level.teno, 1); game.keyboardController = new VVVVVVKeyController(game.level.teno); game.background.CurrentSprite = new NullSprite(); game.gameHUD.PausedCheck = false; game.gameHUD.gameEnded = false; game.isVVVVVV = true; game.isTitle = false; }
public void Update(GameTime gameTime) { songTimer--; if (songTimer < 0) { Game1.GetInstance().level = new Level(StringHolder.levelOne); Game1.GetInstance().background.CurrentSprite = Game1.GetInstance().background.OverworldSprite; Game1.GetInstance().gameState = new TitleScreenGameState(); Game1.GetInstance().isTitle = true; Game1.GetInstance().gameHUD.Coins = 0; Game1.GetInstance().gameHUD.Lives = 3; Game1.GetInstance().gameHUD.Score = 0; } }
public TitleScreenGameState() { factory = new SpriteFactory(); logo = factory.build(SpriteFactory.sprites.title); //SoundManager.PlaySong(SoundManager.songs.title); game = Game1.GetInstance(); menu = new GUI(game); menu.options.Add(new KeyValuePair <ICommands, String>(new LoadLevelCommand(StringHolder.levelOne), "Level 1")); menu.options.Add(new KeyValuePair <ICommands, String>(new LoadLevelCommand(StringHolder.levelTwo), "Level 2")); menu.options.Add(new KeyValuePair <ICommands, String>(new LoadLevelCommand(StringHolder.levelThree), "Level 3")); menu.options.Add(new KeyValuePair <ICommands, String>(new LoadAchPageCommand(), "Achievements")); menu.options.Add(new KeyValuePair <ICommands, String>(new QuitCommand(), "Quit")); menu.currentCommand = menu.options[0].Key; game.keyboardController = new TitleKeyController(menu); }
public GameOverState() { game = Game1.GetInstance(); game.isGameOver = true; font = game.Content.Load <SpriteFont>(StringHolder.bigTextFont); }