public void Update(GameTime gameTime) { if (fishEnemies.Count < maxFishEnemy) { for (int i = fishEnemies.Count; i < maxFishEnemy; i++) { fishEnemies.Add( new FishEnemy(new Vector2( GameDevice.Instance().GetRandom().Next(Screen.Width), GameDevice.Instance().GetRandom().Next(0, Screen.Height / 2)) ) ); } } fishEnemies.ForEach(f => f.DisplayMode()); fishEnemies.ForEach(f => f.Update(gameTime)); fishEnemies.RemoveAll(f => !f.IsInScreen()); player.ModeMenu(nowPos); player.Update(gameTime); if (!(Input.GetKeyState(Keys.Space))) { checkSelectvalue = 0; } if (Input.GetKeyRelease(Keys.Space) && !checkMoveScene) { sound.PlaySE("select"); difficultyNumber++; flashing.Reset(); } if (difficultyNumber > (int)Difficulty.hard) { difficultyNumber = (int)Difficulty.tutorial; } if (Input.GetKeyState(Keys.Space)) { checkSelectvalue++; } if (checkSelectvalue > maxSelectValue) { sound.PlaySE("decide"); isEndFlag = true; } if (Input.GetKeyRelease(Keys.Space)) { checkMoveScene = false; } flashing.Update(gameTime); }
public void Initialize() { isEndFlag = false; gameOverFlash.Reset(); }