コード例 #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
ファイル: TextSprite.cs プロジェクト: srakowski/LD45
 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
         );
 }