From 8db36c4b4f5cda362f96b0956cff903ab274c14e Mon Sep 17 00:00:00 2001 From: Timofey06 Date: Mon, 14 Aug 2023 18:44:36 +0300 Subject: [PATCH] ReplaceSpriteBatchToDraw --- DangerousD/GameCore/Graphics/GraphicsComponent.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DangerousD/GameCore/Graphics/GraphicsComponent.cs b/DangerousD/GameCore/Graphics/GraphicsComponent.cs index bf85d28..eaabb4a 100644 --- a/DangerousD/GameCore/Graphics/GraphicsComponent.cs +++ b/DangerousD/GameCore/Graphics/GraphicsComponent.cs @@ -13,15 +13,15 @@ namespace DangerousD.GameCore.Graphics private List textures; private List texturesNames; private AnimationContainer currentAnimation; - private SpriteBatch _spriteBatch; + //private SpriteBatch _spriteBatch; private string lastAnimationId; private int currentFrame; private int interval; private int lastInterval; private Rectangle sourceRectangle; - public GraphicsComponent(List animationsId, SpriteBatch _spriteBatch) + public GraphicsComponent(List animationsId) { - this._spriteBatch = _spriteBatch; + //this._spriteBatch = _spriteBatch; currentFrame = 0; lastInterval = 1; lastAnimationId = null; @@ -52,7 +52,7 @@ namespace DangerousD.GameCore.Graphics } } } - public void DrawAnimation(Rectangle destinationRectangle, string animationId) + public void DrawAnimation(Rectangle destinationRectangle, string animationId, SpriteBatch _spriteBatch) { if (animationId != lastAnimationId)