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

@@ -8,22 +8,26 @@
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <iostream>
#include "core/defaults.hpp"
#include "core/entities/entitat.hpp"
#include "core/graphics/shape_loader.hpp"
#include "core/input/input.hpp"
#include "core/input/input_types.hpp"
#include "core/rendering/shape_renderer.hpp"
#include "core/types.hpp"
#include "game/constants.hpp"
Nau::Nau(SDL_Renderer* renderer, const char* shape_file)
: renderer_(renderer),
centre_({.x = 0.0F, .y = 0.0F}),
angle_(0.0F),
: Entitat(renderer),
velocitat_(0.0F),
esta_tocada_(false),
brightness_(Defaults::Brightness::NAU),
invulnerable_timer_(0.0F) {
// [NUEVO] Brightness específic per naus
brightness_ = Defaults::Brightness::NAU;
// [NUEVO] Carregar forma compartida des de fitxer
forma_ = Graphics::ShapeLoader::load(shape_file);