Implement traps system: add Trap, Landmine, and EventHorizon classes with collision detection and interaction logic; integrate trap handling in the game scene and enemy AI.

This commit is contained in:
2026-04-02 22:46:24 +01:00
parent db7c2aa7a2
commit 7c35419026
20 changed files with 294 additions and 13 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ class WeaponHandler
weapon.attack(direction)
elsif Gosu.button_down?(Gosu::MS_LEFT)
player_x, player_y = $bus.get(:player_position)
mouse_x, mouse_y = $bus.get(:mouse_position)
mouse_x, mouse_y = $bus.get(:mouse_pos)
direction = Math.atan2(mouse_y - player_y, mouse_x - player_x)
weapon.attack(direction)
end