public void Draw() { SpritePlayer.PlayAnimation(Sprite); if (TTL > 0) { SpritePlayer.Draw(Position, Angle, SpriteEffect); } }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { // clear screen to black _graphicsDevice.Clear(Color.Wheat); // begin spriteBatch for state spriteBatch.Begin(samplerState: SamplerState.PointClamp); // draw sprite _sprPlayer.Draw(gameTime, spriteBatch, new Vector2(_graphicsDevice.Viewport.Width / 2, (_graphicsDevice.Viewport.Height / 3) * 2), SpriteEffects.None); spriteBatch.End(); }
public override void Draw(GameTime gameTime, SpriteBatch spriteBatch) { // clear screen to black _graphicsDevice.Clear(Color.Wheat); // begin spriteBatch for state spriteBatch.Begin(samplerState: SamplerState.PointClamp); // position of logo var pos_x = _graphicsDevice.Viewport.Width / 2; var pos_y = (_graphicsDevice.Viewport.Height / 2) + ((_sprSplash.FrameHeight * _sprPlayer.Scale) / 2); // draw sprite _sprPlayer.Draw(gameTime, spriteBatch, new Vector2(pos_x, pos_y), SpriteEffects.None); spriteBatch.End(); }