format
Some checks failed
Some checks failed
This commit is contained in:
@@ -51,7 +51,9 @@ static func serialize_grid_state(grid: Array, grid_size: Vector2i) -> Array:
|
||||
return serialized_grid
|
||||
|
||||
|
||||
static func get_active_gem_types_from_grid(grid: Array, tile_types: int) -> Array:
|
||||
static func get_active_gem_types_from_grid(
|
||||
grid: Array, tile_types: int
|
||||
) -> Array:
|
||||
# Get active gem types from the first available tile
|
||||
if grid.size() > 0 and grid[0].size() > 0 and grid[0][0]:
|
||||
return grid[0][0].active_gem_types.duplicate()
|
||||
@@ -132,9 +134,15 @@ static func restore_grid_from_layout(
|
||||
tile.tile_type = randi() % tile_types
|
||||
|
||||
# Connect tile signals
|
||||
if tile.has_signal("tile_selected") and match3_node.has_method("_on_tile_selected"):
|
||||
if (
|
||||
tile.has_signal("tile_selected")
|
||||
and match3_node.has_method("_on_tile_selected")
|
||||
):
|
||||
tile.tile_selected.connect(match3_node._on_tile_selected)
|
||||
if tile.has_signal("tile_hovered") and match3_node.has_method("_on_tile_hovered"):
|
||||
if (
|
||||
tile.has_signal("tile_hovered")
|
||||
and match3_node.has_method("_on_tile_hovered")
|
||||
):
|
||||
tile.tile_hovered.connect(match3_node._on_tile_hovered)
|
||||
tile.tile_unhovered.connect(match3_node._on_tile_unhovered)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user