示例#1
0
文件: Sprite.cs 项目: srakowski/LD45
 internal void Draw(SpriteBatch spriteBatch)
 {
     if (!(_texture?.IsLoaded ?? false) || !Enabled)
     {
         return;
     }
     spriteBatch.Draw(
         _texture.GetValue(),
         Entity.Position,
         SourceRectangle,
         Color,
         Entity.Rotation,
         Origin,
         Entity.Scale,
         SpriteEffects,
         LayerDepth
         );
 }
示例#2
0
 internal void Draw(SpriteBatch spriteBatch)
 {
     if (!(_spriteFont?.IsLoaded ?? false) || !Enabled)
     {
         return;
     }
     spriteBatch.DrawString(
         _spriteFont.GetValue(),
         Text,
         Entity.GlobalPosition,
         Color,
         Entity.GlobalRotation,
         Origin,
         Entity.GlobalScale,
         SpriteEffects,
         LayerDepth
         );
 }