feat(firework): halo neon per partícula amb color de glow propi (explosió enemic: línia blanca + halo daurat)
This commit is contained in:
@@ -65,7 +65,9 @@ namespace Effects {
|
||||
SDL_Color color,
|
||||
float initial_speed,
|
||||
int n_points,
|
||||
float initial_brightness) {
|
||||
float initial_brightness,
|
||||
bool glow,
|
||||
SDL_Color glow_color) {
|
||||
if (n_points <= 0) {
|
||||
return;
|
||||
}
|
||||
@@ -105,6 +107,8 @@ namespace Effects {
|
||||
|
||||
fw->brightness = initial_brightness;
|
||||
fw->color = color;
|
||||
fw->glow = glow;
|
||||
fw->glow_color = glow_color;
|
||||
fw->active = true;
|
||||
}
|
||||
}
|
||||
@@ -185,14 +189,26 @@ namespace Effects {
|
||||
.y = fw.head.y - (DIR_Y * fw.current_length),
|
||||
};
|
||||
|
||||
Rendering::linea(renderer_,
|
||||
static_cast<int>(fw.head.x),
|
||||
static_cast<int>(fw.head.y),
|
||||
static_cast<int>(TAIL.x),
|
||||
static_cast<int>(TAIL.y),
|
||||
fw.brightness,
|
||||
0.0F,
|
||||
fw.color);
|
||||
if (fw.glow) {
|
||||
Rendering::lineaGlow(renderer_,
|
||||
static_cast<int>(fw.head.x),
|
||||
static_cast<int>(fw.head.y),
|
||||
static_cast<int>(TAIL.x),
|
||||
static_cast<int>(TAIL.y),
|
||||
fw.brightness,
|
||||
0.0F,
|
||||
fw.color,
|
||||
fw.glow_color);
|
||||
} else {
|
||||
Rendering::linea(renderer_,
|
||||
static_cast<int>(fw.head.x),
|
||||
static_cast<int>(fw.head.y),
|
||||
static_cast<int>(TAIL.x),
|
||||
static_cast<int>(TAIL.y),
|
||||
fw.brightness,
|
||||
0.0F,
|
||||
fw.color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user