浏览代码

Follow walker during chocolate collection

DricomDragon 1 周之前
父节点
当前提交
d802bf9e53
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      godot/component/entity/collectibles/chocolate/chocolate.gd

+ 1 - 0
godot/component/entity/collectibles/chocolate/chocolate.gd

@@ -20,6 +20,7 @@ func _on_chocolate_tablet_body_entered(body: Node3D) -> void:
 
 func _give_chocolate_to(walker: Walker) -> void:
 	walker.give_chocolate()
+	reparent(walker)
 	chocolateAnimation.play(COLLECT_ANIM)
 	chocolateAnimation.animation_finished.connect(_finish)