feat(fireworks): burst radial blanc al explotar enemic + tuning
This commit is contained in:
1 parent
56ce1a3236
commit
0cc1f7623a
5 files changed
+18
-5
No files matched your search
@@ -27,7 +27,7 @@ namespace Effects {
|
||||
// n_points: nombre de línies. Default Defaults::FX::Firework::N_POINTS.
|
||||
// initial_brightness: 0..1.
|
||||
void spawn(const Vec2& origen,
|
||||
SDL_Color color,
|
||||
SDL_Color color = Defaults::FX::Firework::DEFAULT_COLOR,
|
||||
float initial_speed = Defaults::FX::Firework::SPEED,
|
||||
int n_points = Defaults::FX::Firework::N_POINTS,
|
||||
float initial_brightness = Defaults::FX::Firework::INITIAL_BRIGHTNESS);
|
||||
|
||||
@@ -458,6 +458,7 @@ void GameScene::runCollisionDetections() {
|
||||
.score_per_player = score_per_player_,
|
||||
.lives_per_player = lives_per_player_,
|
||||
.debris_manager = debris_manager_,
|
||||
.firework_manager = firework_manager_,
|
||||
.floating_score_manager = floating_score_manager_,
|
||||
.match_config = match_config_,
|
||||
.on_player_hit = [this](uint8_t pid) { tocado(pid); },
|
||||
|
||||
@@ -76,6 +76,10 @@ namespace Systems::Collision {
|
||||
Defaults::Physics::Debris::ENEMY_LIFETIME,
|
||||
Defaults::Physics::Debris::ENEMY_FRICTION,
|
||||
Defaults::Physics::Debris::ENEMY_SEGMENT_MULTIPLIER);
|
||||
|
||||
// Firework burst radial des del centro de l'enemic (efecte adicional al debris).
|
||||
// No heretem color: el burst usa el blanc per defecte per a un feel més lluminós.
|
||||
ctx.firework_manager.spawn(ENEMY_POS);
|
||||
}
|
||||
} // anonymous namespace
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "core/defaults.hpp"
|
||||
#include "core/system/game_config.hpp"
|
||||
#include "game/effects/debris_manager.hpp"
|
||||
#include "game/effects/firework_manager.hpp"
|
||||
#include "game/effects/floating_score_manager.hpp"
|
||||
#include "game/entities/bullet.hpp"
|
||||
#include "game/entities/enemy.hpp"
|
||||
@@ -36,6 +37,7 @@ namespace Systems::Collision {
|
||||
std::array<int, 2>& score_per_player;
|
||||
std::array<int, 2>& lives_per_player;
|
||||
Effects::DebrisManager& debris_manager;
|
||||
Effects::FireworkManager& firework_manager;
|
||||
Effects::FloatingScoreManager& floating_score_manager;
|
||||
const GameConfig::MatchConfig& match_config;
|
||||
// Trigger de muerte del jugador (GameScene::tocado).
|
||||
|
||||
Reference in new issue
Block a user