FunkPanion/scripts/GlobalEvents.gd

15 lines
374 B
GDScript

extends Node
func copy_fa(from: String, to: String) -> void:
var file_from = FileAccess.get_file_as_bytes(from)
var file_to = FileAccess.open(to, FileAccess.WRITE)
file_to.store_buffer(file_from)
file_to.close()
func _enter_tree() -> void:
print("Hello!")
func _notification(what):
if what == NOTIFICATION_WM_CLOSE_REQUEST:
print("Goodbye!")
get_tree().quit()