2023-01-03 18:16:48 -07:00
|
|
|
extends Spatial
|
|
|
|
|
2023-01-03 23:20:07 -07:00
|
|
|
func _ready():
|
|
|
|
Util.shader = self
|
|
|
|
|
|
|
|
func mega_madness():
|
|
|
|
$CanvasLayer/ColorRect.visible = false
|
|
|
|
$CanvasLayer/ColorRect2.visible = true
|
|
|
|
$AudioStreamPlayer.play()
|
|
|
|
|
2023-01-03 18:16:48 -07:00
|
|
|
func madness():
|
|
|
|
$CanvasLayer/ColorRect.visible = false
|
|
|
|
$CanvasLayer/ColorRect2.visible = true
|
|
|
|
$CanvasLayer/ColorRect2/AudioStreamPlayer.play()
|
|
|
|
yield($CanvasLayer/ColorRect2/AudioStreamPlayer, "finished")
|
|
|
|
$CanvasLayer/ColorRect.visible = true
|
|
|
|
$CanvasLayer/ColorRect2.visible = false
|
|
|
|
|
|
|
|
|
|
|
|
export var frequency = 600
|
|
|
|
var seconds = 0.0
|
|
|
|
|
|
|
|
func _process(delta):
|
|
|
|
seconds += delta
|
|
|
|
if seconds > frequency:
|
|
|
|
seconds = 0
|
|
|
|
madness()
|