Skip to content

Commit 8dfd417

Browse files
committed
Fixed
1 parent 6109435 commit 8dfd417

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

game_boards/all_common/common.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func fill_grid(hbox:HBoxContainer, grid:GridContainer):
2222
# Add the instantiated square to the grid container
2323
grid.add_child(brdsq)
2424

25-
func fill_hbox(hbox:HBoxContainer):
25+
func fill_hbox(hbox:HBoxContainer, on_cell_click):
2626
for col_idx in range(hbox.get_child_count()):
2727
for row_idx in range(8):
2828
# A: random gem
@@ -33,7 +33,7 @@ func fill_hbox(hbox:HBoxContainer):
3333
hbox.get_child(col_idx).add_child(gem_cell)
3434
gem_cell.initialize(gem_type)
3535
var control_node = gem_cell.get_node("GemControl")
36-
control_node.connect("cell_click", self._on_cell_click)
36+
control_node.connect("cell_click", on_cell_click)
3737
#control_node.connect("drag_start", self._on_cell_click) # TODO:
3838
#control_node.connect("drag_ended", self._on_cell_click) # TODO:
3939

@@ -80,7 +80,7 @@ func get_all_matches(hbox:HBoxContainer) -> Array:
8080
var streak = 0
8181
var match_start = 0
8282
for row in range(num_rows):
83-
var gem_cell = hbox.get_child(column).get_child(row) as GemCell1
83+
var gem_cell = hbox.get_child(column).get_child(row) as CommonGemCell
8484
if gem_cell.gem_color == last_color:
8585
streak += 1
8686
else:

game_boards/board_food/game_board/Board.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func _ready():
2727
randomize()
2828
# A: populate board
2929
CmnFunc.fill_grid(hbox_container, grid_container)
30-
CmnFunc.fill_hbox(hbox_container)
30+
CmnFunc.fill_hbox(hbox_container, self._on_cell_click)
3131
# B: check board after init
3232
process_game_round()
3333

game_boards/board_space/game_board/GemBoard.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func _ready():
2727
randomize()
2828
# A: populate board
2929
CmnFunc.fill_grid(hbox_container, grid_container)
30-
CmnFunc.fill_hbox(hbox_container)
30+
CmnFunc.fill_hbox(hbox_container, self._on_cell_click)
3131
# B: check board after init
3232
process_game_round()
3333

0 commit comments

Comments
 (0)