public void DrawGame(SpriteBatch spriteBatch, GameTime gameTime, bool fullDraw) { #region Draw Game Particles.Draw(spriteBatch, gameTime); //wall.Draw(spriteBatch, gameTime); gameController.Draw(spriteBatch, gameTime, fullDraw); #endregion }
public void ResetGame(bool fullReset) { if (fullReset) { Particles.Reset(); ScoreHandler.Reset(); playerUI.Reset(); } gameController.Reset(fullReset); }
/// <summary> /// Allows the game to run logic such as updating the world, /// checking for collisions, gathering input, and playing audio. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Update(GameTime gameTime) { if (eventOperator.GameState == EventOperator.GAME_STATE && eventOperator.NewGameState == EventOperator.GAME_STATE) { UpdateGame(gameTime, false); playerUI.Update(gameTime, gameController.Player); } else { eventOperator.Update(gameTime); } Particles.Update(gameTime); CheckGameStatus(gameTime); InputHandler.UpdatePreviousState(); Camera.Update(gameTime); base.Update(gameTime); background.Update(gameTime); }
public void Update(float value, float max) { if (currentMax != max) { currentMax = max; ScaleSprite(borderSprite, max); } if (currentValue != value) { ScaleSprite(scaleSprite, value); currentValue = value; } if (currentValue < currentMax) { List <Vector2> listo = new List <Vector2>(); for (int i = 0; i < Sprite.SpriteRect.Height; i++) { listo.Add(new Vector2(scaleSprite.Scale.X * scaleSprite.SpriteRect.Width, i - Sprite.SpriteRect.Height / 2)); } Particles.GenerateParticles(listo, Position, Vector2.Zero, 15, 0, scaleSprite.MColor); } }
public override void Death() { Particles.GenerateDeathParticles(Sprite, AbsolutePosition, 2, Angle, true); base.Death(); }
protected virtual void Enrage() { Particles.GenerateParticles(Position, 5, Angle, Color.Red); Hull.Color = Color.Black; }