Skip to content

Commit 76e3bb1

Browse files
committed
both boards using common now
1 parent dc20c6a commit 76e3bb1

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed
File renamed without changes.

game_boards/board01/game_board/GameBoard.gd renamed to game_boards/board01/game_board/Board.gd

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ signal board_match_multi(match_cnt:int)
99
@onready var grid_container:GridContainer = $GridContainer
1010
@onready var hbox_container:HBoxContainer = $HBoxContainer
1111
#VARS
12+
var common = preload("res://game_boards/all_common/common.gd").new()
1213
const GEM_COLOR_NAMES = [Enums.GemColor.WHITE, Enums.GemColor.RED, Enums.GemColor.YELLOW, Enums.GemColor.GREEN, Enums.GemColor.PURPLE, Enums.GemColor.BROWN]
1314
const GEM_POINTS:int = 25
1415
var selected_cell_1:GemCell1 = null
@@ -499,13 +500,9 @@ func new_game():
499500
# A:
500501
board_props_moves = 0
501502
board_props_score = 0
502-
# A:
503-
for vbox in hbox_container.get_children():
504-
for gem_cell in vbox.get_children():
505-
gem_cell.initialize(GEM_COLOR_NAMES[randi() % GEM_COLOR_NAMES.size()])
506-
gem_cell.get_child(1).visible = true
507-
gem_cell.get_child(1).position = Enums.SRPITE_POS
508503
# B:
504+
common.new_game_explode_replace(hbox_container, GEM_COLOR_NAMES, Enums.EXPLODE_DELAY)
505+
# C:
509506
process_game_round()
510507

511508
func debug_clear_debug_labels():

game_boards/board01/game_board/board.tscn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[gd_scene load_steps=5 format=3 uid="uid://x4qq2j3l7nvb"]
22

3-
[ext_resource type="Script" path="res://game_boards/board01/game_board/GameBoard.gd" id="1_8mgoe"]
3+
[ext_resource type="Script" path="res://game_boards/board01/game_board/Board.gd" id="1_0vcii"]
44
[ext_resource type="PackedScene" uid="uid://bh2knk60qbton" path="res://game_boards/board01/game_board/board_square_0.tscn" id="2_o5ud0"]
55
[ext_resource type="PackedScene" uid="uid://cry3vnlah6fkx" path="res://game_boards/board01/game_board/board_square_1.tscn" id="3_a576l"]
66

77
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yj5kd"]
88
bg_color = Color(0, 0, 0, 0.411765)
99

1010
[node name="Board" type="Node2D"]
11-
script = ExtResource("1_8mgoe")
11+
script = ExtResource("1_0vcii")
1212

1313
[node name="Background" type="Panel" parent="."]
1414
visible = false

game_boards/board_space/game_board/GemBoard.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ signal board_match_multi(match_cnt:int)
99
@onready var grid_container:GridContainer = $GridContainer
1010
@onready var hbox_container:HBoxContainer = $HBoxContainer
1111
#VARS
12-
var common = preload("res://game_boards/common.gd").new()
12+
var common = preload("res://game_boards/all_common/common.gd").new()
1313
const GEM_COLOR_NAMES = [Enums.GemColor.WHITE, Enums.GemColor.RED, Enums.GemColor.YELLOW, Enums.GemColor.GREEN, Enums.GemColor.PURPLE, Enums.GemColor.BROWN]
1414
const GEM_POINTS:int = 25
1515
var selected_cell_1:GemCellSpace = null

0 commit comments

Comments
 (0)