23 lines
533 B
GDScript3
23 lines
533 B
GDScript3
|
extends Node2D
|
||
|
|
||
|
var pid_of_dlserver = 0
|
||
|
# Declare member variables here. Examples:
|
||
|
# var a = 2
|
||
|
# var b = "text"
|
||
|
|
||
|
|
||
|
# Called when the node enters the scene tree for the first time.
|
||
|
func _ready():
|
||
|
pass # Replace with function body.
|
||
|
|
||
|
|
||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||
|
#func _process(delta):
|
||
|
# pass
|
||
|
|
||
|
func _notification(what):
|
||
|
if what == MainLoop.NOTIFICATION_WM_QUIT_REQUEST:
|
||
|
print("Killing dl-server, pid ",pid_of_dlserver)
|
||
|
OS.kill(pid_of_dlserver)
|
||
|
get_tree().quit() # default behavior
|