public override void Update(GameTime gameTime) { if (!IsInScreen()) { return; } attackTimer.Update(gameTime); if (attackTimer.IsTime) { Attack(); } if (maxCount <= hitCount) { IsDeadFlag = true; deathTimer.Update(gameTime); endTimer.Update(gameTime); downTimer.Update(gameTime); particleTimer.Update(gameTime); if (deathTimer.IsTime) { vibrationVelocity.X = -vibrationVelocity.X; } if (particleTimer.IsTime && !downTimer.IsTime) { sound.PlaySE("boss_dead_short"); new DestroyParticle("death_boss", new Vector2(Position.X + Size.X / 2 - 32, Position.Y + Size.Y / 2 - 32), new Point(64, 64), DestroyParticle.DestroyOption.Center); } if (downTimer.IsTime) { if (!isDeadSound) { sound.PlaySE("boss_dead_long"); } isDeadSound = true; vibrationVelocity.Y = deathvelocity.Y; death.Update(gameTime); if (endTimer.IsTime) { IsDead = true; } } Velocity = vibrationVelocity; } if (hitAlpha < 1.0f) { hitAlpha += 0.07f; } if (hitFlashCount < maxFlashCount && hitAlpha >= 1.0f) { hitAlpha = 0.2f; hitFlashCount++; } base.Update(gameTime); Velocity = Vector2.Zero; }
public void Update(GameTime gameTime) { flashing.Update(gameTime); gameOverFlash.Update(gameTime); if (gameOverFlash.EndFlashing() && Input.GetKeyTrigger(Keys.Space)) { sound.PlaySE("decide"); //シーン移動 isEndFlag = true; } }
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 Update(GameTime gameTime) { if (Input.GetKeyTrigger(Keys.Space)) { sound.PlaySE("decide"); //シーン移動 isEndFlag = true; } flashing.Update(gameTime); particleManager.Update(gameTime); animation.Update(gameTime); titlePlayer.ModeTitle(); titlePlayer.Update(gameTime); jellyEnemies.ForEach(e => e.DisplayMode()); jellyEnemies.ForEach(e => e.Update(gameTime)); }
public void Update(GameTime gameTime) { flashing.Update(gameTime); if (Input.GetKeyTrigger(Keys.Space)) { sound.PlaySE("decide"); //シーン移動 isEndFlag = true; } alpha += plusAlpha; if (alpha >= maxAlpha) { alpha = maxAlpha; } clearParticle.Update(gameTime); particleManager.Update(gameTime); if (clearParticle.IsTime) { new DestroyParticle("fireworks", new Vector2((GameDevice.Instance().GetRandom().Next(7) + 1) * 64, (GameDevice.Instance().GetRandom().Next(11) + 1) * 64), new Point(16, 16), DestroyParticle.DestroyOption.Center); } }