feat: Introduce core game managers and main scene, implementing player UI for board, actions, and power-ups.

This commit is contained in:
Yogi Wiguna
2026-02-05 16:12:34 +08:00
parent fe494b50ef
commit e933773688
6 changed files with 111 additions and 3 deletions
+14
View File
@@ -294,6 +294,8 @@ func _execute_area_freeze(center_pos: Vector2i = Vector2i.ZERO):
# Initial Check (Instant Feedback)
var all_players = player.get_tree().get_nodes_in_group("Players")
var hit_count = 0
for p in all_players:
# Check distance (Chebyshev distance for square area)
var dx = abs(p.current_position.x - center_pos.x)
@@ -303,6 +305,18 @@ func _execute_area_freeze(center_pos: Vector2i = Vector2i.ZERO):
if dx <= radius and dy <= radius:
p.rpc("apply_slow_effect", FREEZE_SLOW_DURATION)
NotificationManager.send_message(p, "Caught in Freeze Zone!", NotificationManager.MessageType.WARNING)
if p != player: # Don't score for freezing self (unless desired?) - Assuming enemies
hit_count += 1
if hit_count > 0 and player.is_multiplayer_authority():
var points = hit_count * 50
var main = player.get_tree().get_root().get_node_or_null("Main")
if main:
var gcm = main.get_node_or_null("GoalsCycleManager")
if gcm:
gcm.add_score(player.name.to_int(), points)
NotificationManager.send_message(player, "Hit %d Players! +%d Pts" % [hit_count, points], NotificationManager.MessageType.GOAL)
# Visual Feedback (Turn Floor Blue - Item 12 on Layer 0)
if player.is_multiplayer_authority():