Refactor systems to use EventBus for communication

- Removed direct dependencies on GameState in multiple systems, replacing them with EventBus for event-driven architecture.
- Updated CameraShakeSystem to handle focus changes and trauma through EventBus.
- Modified DeadliftSystem to manage lift efforts and hazards using EventBus.
- Refactored GameManager to handle lift results and day transitions via EventBus.
- Adjusted HazardController and HazardSystem to publish and respond to hazard events through EventBus.
- Enhanced PlayerInputSystem to publish lift efforts and focus releases using EventBus.
- Updated SoundManager to handle various audio events through EventBus, improving sound management.
- Refined TunnelSystem to manage focus changes and lift efforts using EventBus.
- Adjusted LiftProgressBar to update progress based on events from EventBus.
- Enhanced LiftSyncController to synchronize animations based on lift efforts and focus events via EventBus.
This commit is contained in:
2026-01-24 18:15:34 +01:00
parent 140e0f1cff
commit 266fa4ac1d
24 changed files with 738 additions and 540 deletions

View File

@@ -1,6 +1,5 @@
[gd_scene load_steps=3 format=3 uid="uid://dx1k40qfioaas"]
[ext_resource type="GameState" uid="uid://2gma8vvisnqo" path="res://Resources/GameState.tres" id="1_n6ace"]
[ext_resource type="Texture2D" uid="uid://cbgn8aspf7oi0" path="res://Sprites/barbell.png" id="2_ltxro"]
[node name="Deadlift" type="Node"]
@@ -9,7 +8,6 @@
bar_height = 7.0
bar_visual = NodePath("../Barbell")
end_pos = Vector2(0, -30)
game_state = ExtResource("1_n6ace")
[node name="Barbell" type="Sprite2D" parent="."]
scale = Vector2(2, 2)