feat: implementar jerarquia d'entitats amb classe base Entitat
This commit is contained in:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user