Пример #1
0
 public override void Draw(GameTime gameTime)
 {
     if (!ended)
     {
         SpriteBatch  sb = Game.Services.GetService <SpriteBatch>();
         SpriteRender sr = Game.Services.GetService <SpriteRender>();
         sb.Begin();
         texture.Draw(gameTime, sr, position, scale);
         sb.End();
         base.Draw(gameTime);
     }
 }
Пример #2
0
 public override void Draw(GameTime gameTime)
 {
     if (!ended)
     {
         if (!exploded)
         {
             if (el.dying)
             {
                 el.Draw(gameTime);
             }
         }
         else
         {
             SpriteBatch  sb = Game.Services.GetService <SpriteBatch>();
             SpriteRender sr = Game.Services.GetService <SpriteRender>();
             sb.Begin();
             explosionTexture.Draw(gameTime, sr, el.rectangle.Center.ToVector2(), scale);
             sb.End();
         }
     }
     base.Draw(gameTime);
 }