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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
extends Control
const world = preload("res://World.tscn")
export(float) var timer_length := 0.0
onready var settings := $ColorRect/Settings
onready var colorrect := $ColorRect
onready var tween := $Tween
onready var timer := $Timer
func _on_local_pressed():
get_tree().change_scene_to(world)
func _ready():
randomize()
timer.start(timer_length)
_on_Timer_timeout()
func _on_quit_pressed():
get_tree().quit()
func _on_settings_pressed():
settings.toggle(true)
func _on_Timer_timeout():
tween.interpolate_property(
colorrect,
"color",
colorrect.color,
Color(rand_range(0, 1), rand_range(0, 1), rand_range(0, 1)),
timer_length,
Tween.TRANS_ELASTIC,
Tween.EASE_IN_OUT
)
tween.start()
timer.start(timer_length)
|