Main Menu 0.3
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user