diff --git a/source/game/entities/enemy.cpp b/source/game/entities/enemy.cpp index 7766297..d531a12 100644 --- a/source/game/entities/enemy.cpp +++ b/source/game/entities/enemy.cpp @@ -245,6 +245,17 @@ void Enemy::draw() const { color = Defaults::Palette::MOLINILLO; break; } + + // Parpadeo dorado mientras está herido: alterna color de tipo ↔ dorado + // a Wounded::BLINK_HZ usando el timer (fmod sobre el periodo). + if (wounded_timer_ > 0.0F) { + const float CYCLE = 1.0F / Defaults::Enemies::Wounded::BLINK_HZ; + const float T = std::fmod(wounded_timer_, CYCLE); + if (T < (CYCLE / 2.0F)) { + color = Defaults::Palette::WOUNDED; + } + } + Rendering::renderShape(renderer_, shape_, center_, rotacio_, SCALE, 1.0F, brightness_, color); }