How do I implement a delay/wait for func _process(delta) before it runs?
I'm trying to have a solid splash screen that appears on screen, and only after a 3-second delay before it proceeds to move upwards out of screen.
extends Node2D
var a = position.x
var b = position.y
var splashes = ["blue", "orange", "green", "yellow"]
var yStay = -75
var vSpeed = 500
var direction = -1
func _ready():
randomize()
randomSplash()
$Splashtimer.start()
func _on_Splashtimer_timeout():
randomSplash()
func _process(delta):
position = Vector2(position.x, position.y + (delta * vSpeed * direction))
print(position.y)
func randomSplash():
$AnimatedSprite.animation = splashes[randi() % splashes.size()]