refactor(enemies): renombra QUADRAT/MOLINILLO a SQUARE/PINWHEEL

This commit is contained in:
JailDesigner committed 2026-05-24 07:40:54 +02:00
1 parent 6210985548
commit e5e3729215
13 files changed
+200 -200

No files matched your search

+6 -6
View File
@@ -13,8 +13,8 @@
// Tipo de enemy
enum class EnemyType : uint8_t {
PENTAGON = 0, // Pentágono esquivador (zigzag)
QUADRAT = 1, // Cuadrado perseguidor (tracks ship)
MOLINILLO = 2 // Molinillo agresivo (rápido, girando)
SQUARE = 1, // Square perseguidor (tracks ship)
PINWHEEL = 2 // Molinillo agresivo (rápido, girando)
};
// Estado de animación (palpitación + rotación acelerada)
@@ -60,7 +60,7 @@ class Enemy : public Entities::Entity {
}
// Marcar destruido (desactiva el cuerpo físicamente: radius=0)
void destruir();
void destroy();
// Getters
[[nodiscard]] auto getRotationDelta() const -> float { return drotacio_; }
@@ -90,7 +90,7 @@ class Enemy : public Entities::Entity {
// Estado "herido": entre primer impacto de bala y explosión diferida.
// shooter_id: id del jugador que herí; 0xFF = sin atribución (cadena, etc.).
void herir(uint8_t shooter_id = 0xFF);
void hurt(uint8_t shooter_id = 0xFF);
[[nodiscard]] auto isWounded() const -> bool { return wounded_timer_ > 0.0F; }
[[nodiscard]] auto getWoundedTimer() const -> float { return wounded_timer_; }
[[nodiscard]] auto woundExpiredThisFrame() const -> bool { return wound_expired_this_frame_; }
@@ -130,8 +130,8 @@ class Enemy : public Entities::Entity {
void updatePalpitation(float delta_time);
void updateRotationAcceleration(float delta_time);
void behaviorPentagon(float delta_time);
void behaviorQuadrat(float delta_time);
void behaviorMolinillo(float delta_time);
void behaviorSquare(float delta_time);
void behaviorPinwheel(float delta_time);
[[nodiscard]] auto computeCurrentScale() const -> float;
// Estático: solo opera sobre ship_pos pasado; no consulta estado del enemy.
static auto attemptSafeSpawn(const Vec2& ship_pos, float& out_x, float& out_y) -> bool;