feat: Implement core player character setup, a centralized notification system, and special tile power-up management with inventory and cooldowns.

This commit is contained in:
Yogi Wiguna
2026-02-05 17:16:15 +08:00
parent e933773688
commit a4bd5e3c0b
13 changed files with 208 additions and 26 deletions
+3 -1
View File
@@ -46,7 +46,9 @@ static func send_message(target: Node, message: String, type: int = MessageType.
# Call the RPC on the target (usually a Player node)
# "any_peer" allows any client to send this message to the target
target.rpc("display_message", message, type)
# COMMENTED OUT PER USER REQUEST (Hide MessageBar/Notifications)
# target.rpc("display_message", message, type)
pass
# Helper for broadcasting to all players (if needed in future)
static func broadcast_to_all(tree: SceneTree, message: String, type: int = MessageType.NORMAL):
+1 -1
View File
@@ -314,7 +314,7 @@ func _execute_area_freeze(center_pos: Vector2i = Vector2i.ZERO):
if main:
var gcm = main.get_node_or_null("GoalsCycleManager")
if gcm:
gcm.add_score(player.name.to_int(), points)
gcm.rpc("request_add_score", points)
NotificationManager.send_message(player, "Hit %d Players! +%d Pts" % [hit_count, points], NotificationManager.MessageType.GOAL)
+4 -6
View File
@@ -401,22 +401,20 @@ func setup_playerboard_label(main_node):
var lbl = main_node.get_node_or_null("PlayerBoardLabel")
if lbl:
playerboard_label = lbl
playerboard_label.text = "" # Hidden initially
playerboard_label.text = "x0" # Start at x0
print("[UIManager] Found PlayerBoardLabel")
else:
print("[UIManager] PlayerBoardLabel not found")
func update_goal_count_label(count: int):
if playerboard_label:
playerboard_label.text = "x%d" % count
# Pop effect only for progress
if count > 0:
playerboard_label.text = "x%d" % count
# Pop effect
var tween = playerboard_label.create_tween()
playerboard_label.scale = Vector2(1.5, 1.5)
tween.tween_property(playerboard_label, "scale", Vector2(1.0, 1.0), 0.3).set_trans(Tween.TRANS_BOUNCE)
else:
playerboard_label.text = ""
# Method to update leaderboard with all players in match
func initialize_leaderboard_with_players(players: Array):