summaryrefslogtreecommitdiff
path: root/doc/classes/MainLoop.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/MainLoop.xml')
-rw-r--r--doc/classes/MainLoop.xml34
1 files changed, 17 insertions, 17 deletions
diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml
index 23ce20a434..9e65da8eea 100644
--- a/doc/classes/MainLoop.xml
+++ b/doc/classes/MainLoop.xml
@@ -15,29 +15,29 @@
var quit = false
func _initialize():
- print("Initialized:")
- print(" Starting time: %s" % str(time_elapsed))
+ print("Initialized:")
+ print(" Starting time: %s" % str(time_elapsed))
func _idle(delta):
- time_elapsed += delta
- # Return true to end the main loop
- return quit
+ time_elapsed += delta
+ # Return true to end the main loop.
+ return quit
func _input_event(event):
- # Record keys
- if event is InputEventKey and event.pressed and !event.echo:
- keys_typed.append(OS.get_scancode_string(event.scancode))
- # Quit on Escape press
- if event.scancode == KEY_ESCAPE:
- quit = true
- # Quit on any mouse click
- if event is InputEventMouseButton:
- quit = true
+ # Record keys.
+ if event is InputEventKey and event.pressed and !event.echo:
+ keys_typed.append(OS.get_scancode_string(event.scancode))
+ # Quit on Escape press.
+ if event.scancode == KEY_ESCAPE:
+ quit = true
+ # Quit on any mouse click.
+ if event is InputEventMouseButton:
+ quit = true
func _finalize():
- print("Finalized:")
- print(" End time: %s" % str(time_elapsed))
- print(" Keys typed: %s" % var2str(keys_typed))
+ print("Finalized:")
+ print(" End time: %s" % str(time_elapsed))
+ print(" Keys typed: %s" % var2str(keys_typed))
[/codeblock]
</description>
<tutorials>