online multiplayer chess game (note server currently down)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
extends VBoxContainer
export(PoolStringArray) var pgns
var in_sim = false
func _ready():
if !Debug.debug:
queue_free()
func _load(i: int):
PacketHandler.load_pgn(pgns[i])
in_sim = true
func _input(_event):
if Input.is_action_pressed("ui_cancel") and in_sim:
in_sim = false
PacketHandler.go_back("", true)
get_node("/root/Game").queue_free()
get_parent().show()
Globals.reset_vars()
func _on_test_chat_pressed():
get_tree().change_scene_to(preload("res://ui/chat/Chat.tscn"))
|