Beispiel #1
0
 public void Draw(SpriteBatch spriteBatch, GameTime gameTime)
 {
     if (!IsEnabled)
     {
         return;
     }
     spriteBatch.FillRectangle(Color.FromArgb((int)currentAlpha, 0, 0, 0), display);
 }
Beispiel #2
0
        /// <summary>
        /// Draws the Player.
        /// </summary>
        /// <param name="spriteBatch">The spriteBatch.</param>
        /// <param name="gameTime">The GameTime.</param>
        public override void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            if (!_isVisible) return;

            spriteBatch.DrawTexture(Sprite, Position);

            //healthbar
            if (!EnableHPBar) return;

            spriteBatch.FillRectangle(Color.Red, _healthBarRed);
            spriteBatch.FillRectangle(Color.Green, _healthBarGreen);
        }
Beispiel #3
0
 /// <summary>
 /// Draws the BlackBlend.
 /// </summary>
 /// <param name="spriteBatch">The spriteBatch.</param>
 /// <param name="gameTime">The GameTime.</param>
 public void Draw(SpriteBatch spriteBatch, GameTime gameTime)
 {
     if (!IsEnabled) return;
     spriteBatch.FillRectangle(Color.FromArgb(_alpha, 0, 0, 0), _display);
 }
Beispiel #4
0
        /// <summary>
        /// Draws the Minimap.
        /// </summary>
        /// <param name="spriteBatch">The spriteBatch.</param>
        /// <param name="gameTime">The GameTime.</param>
        public void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            if (!Visible) return;

            spriteBatch.DrawTexture(_minimap, new Vector2(X, Y), 0.4f);

            foreach (Vector2 enemy in _enemyPositions)
            {
                spriteBatch.FillRectangle(Color.Red, new Rectangle(enemy.X, enemy.Y, 5, 5));
            }

            foreach (Vector2 projectile in _projectilePositions)
            {
                spriteBatch.FillRectangle(Color.Blue, new Rectangle(projectile.X, projectile.Y, 2, 2));
            }

            spriteBatch.FillRectangle(Color.Green, new Rectangle(_playerPosition.X, _playerPosition.Y, 5, 5));
        }