afegida la classe Explosions

This commit is contained in:
2024-07-28 12:46:26 +02:00
parent 2948684ad3
commit 59680ce7c0
3 changed files with 73 additions and 18 deletions

View File

@@ -49,6 +49,11 @@ Game::Game(int playerID, int currentStage, SDL_Renderer *renderer, Screen *scree
n2500Sprite = new SmartSprite(gameTextTexture);
n5000Sprite = new SmartSprite(gameTextTexture);
explosions->addTexture(1, explosionsTextures[0], explosionsAnimations[0]);
explosions->addTexture(2, explosionsTextures[1], explosionsAnimations[1]);
explosions->addTexture(3, explosionsTextures[2], explosionsAnimations[2]);
explosions->addTexture(4, explosionsTextures[3], explosionsAnimations[3]);
canvas = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, playArea.w, playArea.h);
SDL_SetTextureBlendMode(canvas, SDL_BLENDMODE_BLEND);