fix: resolve 43 GDScript warnings and fix card display
- Rename shadowed variables (round->_round, seed->_seed, is_processing->_is_processing) - Prefix unused parameters with underscore throughout - Add @warning_ignore for false positive integer_division warnings - Fix unused_signal warnings in event_bus.gd - Fix CardNode display: move setup() after add_child() so @onready works - Redesign CardNode with Panel background, suit symbols, red/black colors - Delete unused _current_hint in TrainingController
This commit is contained in:
@@ -65,10 +65,14 @@ func _on_hint_pressed() -> void:
|
||||
hand_area.selected_cards.append(card)
|
||||
if status_label: status_label.text = "建议牌型: %s (rank=%d)" % [hint.type, hint.primary_rank]
|
||||
|
||||
func _on_game_ended(winner_team: int, reason: String) -> void:
|
||||
func _on_game_ended(winner_team: int, _reason: String) -> void:
|
||||
if status_label: status_label.text = "游戏结束! 队伍 %d 获胜" % winner_team
|
||||
if hand_area: hand_area.disable_input()
|
||||
|
||||
func _refresh_ui() -> void:
|
||||
if controller and controller.game_state and hand_area:
|
||||
hand_area.update_hand(controller.game_state.get_hand(0))
|
||||
var hand: Array = controller.game_state.get_hand(0)
|
||||
print("[DEBUG] _refresh_ui: hand size = ", hand.size())
|
||||
hand_area.update_hand(hand)
|
||||
else:
|
||||
print("[DEBUG] _refresh_ui: controller=", controller, " game_state=", controller.game_state if controller else null, " hand_area=", hand_area)
|
||||
|
||||
Reference in New Issue
Block a user