提交 9694f5c9 编写于 作者: 开发游戏的老王's avatar 开发游戏的老王

修改了一个BUG

上级 011b7454
...@@ -34,11 +34,13 @@ func _ready(): ...@@ -34,11 +34,13 @@ func _ready():
add_to_group("game") add_to_group("game")
$CounterLabel.text = String(tiles.size()) $CounterLabel.text = String(tiles.size())
func distribute_face() -> int:
var face = -1 #func distribute_face() -> int:
if tiles.size() > 0: # var face = -1
face = tiles.pop_front() # if tiles.size() > 0:
return face # face = tiles.pop_front()
# return face
var tiles_index = -1 var tiles_index = -1
......
...@@ -28,7 +28,7 @@ func _ready(): ...@@ -28,7 +28,7 @@ func _ready():
box[i][j].resize(size_z) box[i][j].resize(size_z)
for k in range(size_z): for k in range(size_z):
if Mask == null or Mask[i][j] == 1: if Mask == null or Mask[i][j] == 1:
box[i][j][k] = add_tile(i,j,k,get_parent().distribute_face()) box[i][j][k] = add_tile(i,j,k,get_parent().redistribute_face())
else: else:
box[i][j][k] = null box[i][j][k] = null
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册