project_teddy/scripts/sceneChangerConfirm.gd

24 lines
434 B
GDScript3
Raw Normal View History

extends Control
func _ready():
pass
func _process(delta):
pass
func _on_yes_button_pressed():
2023-05-23 13:03:06 -06:00
if Global.goScene == "res://scenes/mainmenu-background.tscn":
Global.playingGame = false
2023-05-23 13:03:06 -06:00
if Global.teddyAuthorityID == 1:
Global.kickAllPlayers = true
await get_tree().create_timer(0.5).timeout
Networking.peer.close()
get_tree().change_scene_to_file(Global.goScene)
func _on_no_button_pressed():
self.queue_free()