Solventat bug amb el punter a ScoreboardData

This commit is contained in:
2025-02-27 14:17:00 +01:00
parent c6474cb2da
commit 0cec9f8556
20 changed files with 246 additions and 223 deletions

View File

@@ -1,16 +1,16 @@
#include "enemy.h"
#include <SDL2/SDL_render.h> // for SDL_RendererFlip, SDL_FLIP_NONE, SDL_FL...
#include <stdlib.h> // for rand
#include "animated_sprite.h" // for AnimatedSprite
#include "options.h" // for Options, OptionsVideo, options
#include "resource.h" // for Resource
#include "texture.h" // for Texture
#include <SDL2/SDL_render.h> // for SDL_RendererFlip, SDL_FLIP_NONE, SDL_FL...
#include <stdlib.h> // for rand
#include "animated_sprite.h" // for AnimatedSprite
#include "options.h" // for Options, OptionsVideo, options
#include "resource.h" // for Resource
#include "texture.h" // for Texture
// Constructor
Enemy::Enemy(EnemyData enemy)
{
// Crea objetos
sprite_ = std::make_shared<AnimatedSprite>(Resource::get()->getTexture(enemy.texture_path), Resource::get()->getAnimation(enemy.animation_path));
sprite_ = std::make_shared<AnimatedSprite>(Resource::get()->getTexture(enemy.texture_path), Resource::get()->getAnimations(enemy.animation_path));
// Obten el resto de valores
x1_ = enemy.x1;