afegit nivell de brillo per shape
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
|
||||
#include "core/defaults.hpp"
|
||||
#include "core/graphics/shape_loader.hpp"
|
||||
#include "core/rendering/shape_renderer.hpp"
|
||||
#include "game/constants.hpp"
|
||||
@@ -19,7 +20,8 @@ Enemic::Enemic(SDL_Renderer* renderer)
|
||||
velocitat_(0.0f),
|
||||
drotacio_(0.0f),
|
||||
rotacio_(0.0f),
|
||||
esta_(false) {
|
||||
esta_(false),
|
||||
brightness_(Defaults::Brightness::ENEMIC) {
|
||||
// [NUEVO] Carregar forma compartida des de fitxer
|
||||
forma_ = Graphics::ShapeLoader::load("enemy_pentagon.shp");
|
||||
|
||||
@@ -79,7 +81,7 @@ void Enemic::actualitzar(float delta_time) {
|
||||
void Enemic::dibuixar() const {
|
||||
if (esta_ && forma_) {
|
||||
// [NUEVO] Usar render_shape en lloc de rota_pol
|
||||
Rendering::render_shape(renderer_, forma_, centre_, rotacio_, 1.0f, true);
|
||||
Rendering::render_shape(renderer_, forma_, centre_, rotacio_, 1.0f, true, 1.0f, brightness_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user