Main Menu 0.3

This commit is contained in:
2020-02-19 00:32:05 +01:00
parent 303bac604b
commit d65d31abce
9 changed files with 1201 additions and 39 deletions
+22
View File
@@ -0,0 +1,22 @@
extends Spatial
var _timer = null
var _thisloop = true
func _ready():
_timer = Timer.new()
add_child(_timer)
_timer.connect("timeout", self, "_on_Timer_timeout")
_timer.set_wait_time(1)
_timer.set_one_shot(false) # Make sure it loops
_timer.start()
func _on_Timer_timeout():
if _thisloop:
get_node("World/RedLight").light_energy = 0
_thisloop = false
else:
get_node("World/RedLight").light_energy = 10
_thisloop = true