doc: Sync classref with current source
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user