afegit nivell de brillo per shape
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "core/audio/audio.hpp"
|
||||
#include "core/defaults.hpp"
|
||||
#include "core/graphics/shape_loader.hpp"
|
||||
#include "core/rendering/shape_renderer.hpp"
|
||||
#include "game/constants.hpp"
|
||||
@@ -17,7 +18,8 @@ Bala::Bala(SDL_Renderer* renderer)
|
||||
centre_({0.0f, 0.0f}),
|
||||
angle_(0.0f),
|
||||
velocitat_(0.0f),
|
||||
esta_(false) {
|
||||
esta_(false),
|
||||
brightness_(Defaults::Brightness::BALA) {
|
||||
// [NUEVO] Carregar forma compartida des de fitxer
|
||||
forma_ = Graphics::ShapeLoader::load("bullet.shp");
|
||||
|
||||
@@ -66,7 +68,7 @@ void Bala::dibuixar() const {
|
||||
if (esta_ && forma_) {
|
||||
// [NUEVO] Usar render_shape en lloc de rota_pol
|
||||
// Les bales no roten visualment (angle sempre 0.0f)
|
||||
Rendering::render_shape(renderer_, forma_, centre_, 0.0f, 1.0f, true);
|
||||
Rendering::render_shape(renderer_, forma_, centre_, 0.0f, 1.0f, true, 1.0f, brightness_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user