You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
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()