Exemplo n.º 1
0
 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
 }
Exemplo n.º 2
0
 public void ResetGame(bool fullReset)
 {
     if (fullReset)
     {
         Particles.Reset();
         ScoreHandler.Reset();
         playerUI.Reset();
     }
     gameController.Reset(fullReset);
 }
Exemplo n.º 3
0
 /// <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);
 }
Exemplo n.º 4
0
 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);
     }
 }
Exemplo n.º 5
0
 public override void Death()
 {
     Particles.GenerateDeathParticles(Sprite, AbsolutePosition, 2, Angle, true);
     base.Death();
 }
Exemplo n.º 6
0
 protected virtual void Enrage()
 {
     Particles.GenerateParticles(Position, 5, Angle, Color.Red);
     Hull.Color = Color.Black;
 }