예제 #1
0
 /// <summary>
 /// Draws the <see cref="Entity"/>. Override to add custom draw logic which is executed every frame.
 /// </summary>
 /// <param name="time">time</param>
 /// <param name="spriteBatch">spriteBatch</param>
 protected override void Draw(DeltaGameTime time, SpriteBatch spriteBatch)
 {
     base.Draw(time, spriteBatch);
     //if (IsOutlined)
     //{
     //    spriteBatch.End();
     //    G.SimpleEffect.SetTechnique(Effects.SimpleEffect.Technique.FillColor);
     //    G.SimpleEffect.Color = OutlineColor;
     //    spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, G.SimpleEffect, G.World.Camera.View);
     //    spriteBatch.Draw(_spriteSheet.Texture, RenderPosition - Vector2.UnitY, _sourceRectangle, Tint, Rotation, RenderOrigin, Scale, SpriteEffects, 0);
     //    spriteBatch.Draw(_spriteSheet.Texture, RenderPosition + Vector2.UnitX, _sourceRectangle, Tint, Rotation, RenderOrigin, Scale, SpriteEffects, 0);
     //    spriteBatch.Draw(_spriteSheet.Texture, RenderPosition + Vector2.UnitY, _sourceRectangle, Tint, Rotation, RenderOrigin, Scale, SpriteEffects, 0);
     //    spriteBatch.Draw(_spriteSheet.Texture, RenderPosition - Vector2.UnitX, _sourceRectangle, Tint, Rotation, RenderOrigin, Scale, SpriteEffects, 0);
     //    spriteBatch.End();
     //    spriteBatch.Begin(SpriteSortMode.Deferred, null, SamplerState.PointClamp, null, null, null, G.World.Camera.View);
     //}
     spriteBatch.DrawTransformableEntity(this, _spriteSheet.Texture, _sourceRectangle, _spriteEffects, 0);
 }