diff --git a/highway_vector.py b/highway_vector.py index 6eca320..cc4fb73 100644 --- a/highway_vector.py +++ b/highway_vector.py @@ -414,13 +414,21 @@ class Game: self.entities.append(Enemy(5.0, y, destructible=False)) def handle_collisions(self): - # Muerte por contacto con enemigo + # Muerte por contacto de un enemigo con el Jugador O con el VORTEX for entity in self.entities: if isinstance(entity, Enemy): - if ( + # Colisión con el Jugador + touch_player = ( abs(entity.gx - self.player.gx) < 0.5 and abs(entity.gy - self.player.gy) < 0.5 - ): + ) + # Colisión con el VORTEX + touch_vortex = ( + abs(entity.gx - self.vortex.gx) < 0.6 + and abs(entity.gy - self.vortex.gy) < 0.6 + ) + + if touch_player or touch_vortex: self.lives -= 1 if self.lives > 0: self.reset_level() diff --git a/img-versiones/version_2.2.png b/img-versiones/version_2.2.png new file mode 100644 index 0000000..518dd6d Binary files /dev/null and b/img-versiones/version_2.2.png differ