virtualx-engine/demos/misc/pause/spinpause.gd
Rémi Verschelde 8639cecf4c Improve code formatting and update to 2.0
The scripts were streamlined using more or less the following conventions:
 - space after a comma in lists of arguments
 - space around weak operators (+, -), no space around strong operators (*, /)
 - space after a comment start (#)
 - removed trailing spaces or tabs, apart from those that delimit the function indentation level (those could be removed too but since they are added automatically by the editor when typing code, keeping them for now)
 - function blocks separate by two newlines

The scene files were resaved with the (current) 2.0 format, and some scenes that were in XML format were converted to SCN, to be consistent across all demos.
2015-12-09 08:38:23 +01:00

13 lines
242 B
GDScript

extends Spatial
func _on_pause_pressed():
get_node("pause_popup").set_exclusive(true)
get_node("pause_popup").popup()
get_tree().set_pause(true)
func _on_unpause_pressed():
get_node("pause_popup").hide()
get_tree().set_pause(false)