您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

17 行
332 B

  1. extends Area
  2. export var goldToGive : int = 1
  3. var rotateSpeed : float = 5.0
  4. # called every frame
  5. func _process (delta):
  6. # rotate along the Y axis
  7. rotate_y(rotateSpeed * delta)
  8. func _on_Pickup_body_entered(body):
  9. # is this the player? If so give them gold
  10. if body.name == "Player":
  11. body.give_gold(goldToGive)
  12. queue_free()