浏览代码

Get a new ball when a brick is destroyed

DricomDragon 3 年之前
父节点
当前提交
fb2e294a86
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      godot/scripts/Launcher.gd

+ 5 - 0
godot/scripts/Launcher.gd

@@ -43,6 +43,7 @@ func shoot():
 		bullet.grid = grid
 		add_child(bullet)
 		bullet.connect("tree_exited", self, "_on_Ball_tree_exited")
+		bullet.connect("kace_broken", self, "_on_Ball_kace_broken")
 
 
 func loadBullet(n:int):
@@ -69,3 +70,7 @@ func _on_Ball_tree_exited():
 		target.position = source.position
 		nbAmmo = nbStorage
 		nbStorage = 0
+
+
+func _on_Ball_kace_broken():
+	loadBullet(1)