예제 #1
0
        public void Draw()
        {
            SpritePlayer.PlayAnimation(Sprite);

            if (TTL > 0)
            {
                SpritePlayer.Draw(Position, Angle, SpriteEffect);
            }
        }
예제 #2
0
        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();
        }
예제 #3
0
        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();
        }