quitbutton.gd 381 B

1234567891011121314151617181920
  1. extends Button
  2. # Declare member variables here. Examples:
  3. # var a = 2
  4. # var b = "text"
  5. # Called when the node enters the scene tree for the first time.
  6. func _ready():
  7. connect("pressed", self, "quit")
  8. pass # Replace with function body.
  9. func quit():
  10. get_tree().quit()
  11. # Called every frame. 'delta' is the elapsed time since the previous frame.
  12. #func _process(delta):
  13. # pass