feat: implementar jerarquia d'entitats amb classe base Entitat

This commit is contained in:
2025-12-19 13:01:58 +01:00
parent 70f2642e6d
commit 47f7ffb169
12 changed files with 188 additions and 141 deletions

View File

@@ -6,22 +6,26 @@
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <iostream>
#include "core/audio/audio.hpp"
#include "core/defaults.hpp"
#include "core/entities/entitat.hpp"
#include "core/graphics/shape_loader.hpp"
#include "core/rendering/shape_renderer.hpp"
#include "core/types.hpp"
#include "game/constants.hpp"
Bala::Bala(SDL_Renderer* renderer)
: renderer_(renderer),
centre_({.x = 0.0F, .y = 0.0F}),
angle_(0.0F),
: Entitat(renderer),
velocitat_(0.0F),
esta_(false),
grace_timer_(0.0F),
brightness_(Defaults::Brightness::BALA) {
owner_id_(0),
grace_timer_(0.0F) {
// [NUEVO] Brightness específic per bales
brightness_ = Defaults::Brightness::BALA;
// [NUEVO] Carregar forma compartida des de fitxer
forma_ = Graphics::ShapeLoader::load("bullet.shp");