online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/StartMenu.gd')
-rw-r--r--ui/StartMenu.gd30
1 files changed, 2 insertions, 28 deletions
diff --git a/ui/StartMenu.gd b/ui/StartMenu.gd
index dd4e5fc..de541e2 100644
--- a/ui/StartMenu.gd
+++ b/ui/StartMenu.gd
@@ -2,30 +2,14 @@ extends Control
const world = preload("res://Board.tscn")
-export(float) var timer_length := 0.0
-
-export(Array, Color) var nice_colors
-
-onready var settings := $ColorRect/Settings
-onready var colorrect := $ColorRect
-onready var tween := $Tween
-onready var timer := $Timer
-onready var lobby := $ColorRect/Lobby
+onready var settings := $Darken/Settings
func _ready() -> void:
- randomize()
- colorrect.color = nice_colors[randi() % nice_colors.size()]
- timer.start(timer_length)
- _on_Timer_timeout()
if OS.has_feature("HTML5"):
find_node("quit").queue_free()
-func rand(clr) -> float:
- return clamp(clr + rand_range(0, .1) if randi() % 2 else clr - rand_range(0, .1), 0, 1)
-
-
func _on_local_pressed() -> void:
get_tree().change_scene_to(world)
@@ -38,15 +22,5 @@ func _on_settings_pressed() -> void:
settings.toggle(true)
-func _on_Timer_timeout() -> void:
- var clr = nice_colors[randi() % nice_colors.size()]
- clr.r = rand(clr.r)
- clr.b = rand(clr.b)
- clr.g = rand(clr.g)
- tween.interpolate_property(colorrect, "color", colorrect.color, clr, timer_length, Tween.TRANS_ELASTIC)
- tween.start()
- timer.start(timer_length)
-
-
func _on_multiplayer_pressed() -> void:
- lobby.toggle(true)
+ get_tree().change_scene("res://ui/Lobby.tscn")