You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
913 B
38 lines
913 B
extends Control
|
|
|
|
var label_number = 0
|
|
var zone
|
|
var level
|
|
onready var small_label = $ZoneNumber
|
|
onready var title_label = $LevelName
|
|
|
|
func _ready():
|
|
$MonoBackground/Back.color = Color(randf(),randf(),randf())
|
|
small_label.text = "Stage "+str(global.current_level+1)
|
|
title_label.text = global.level_names[global.current_level]
|
|
|
|
func _process(delta):
|
|
if Input.is_action_just_pressed("shoot"):
|
|
go()
|
|
|
|
func _on_Timer_timeout():
|
|
if label_number != 2:
|
|
$MonoBackground/Back.color = Color(randf(),randf(),randf())
|
|
match label_number:
|
|
0:
|
|
title_label.visible = true
|
|
small_label.visible = false
|
|
1:
|
|
small_label.text = "GET READY"
|
|
title_label.visible = false
|
|
small_label.visible = true
|
|
2:
|
|
small_label.text = "GO"
|
|
$Timer.stop()
|
|
go()
|
|
label_number += 1
|
|
|
|
func go():
|
|
set_process(false)
|
|
global.game_root.change_scene("res://src/Level/"+global.level_list[global.current_level]+".tscn",true)
|