1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
extends Node2D
const funny_numbers := [
69,
420,
1337,
911,
666,
777,
3630,
51,
255,
13,
9001,
713705,
127001,
160,
-1
]
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
if randi_range(0, 2) == 2:
$Label.text = str(funny_numbers[randi_range(0, len(funny_numbers) - 1)])
else:
$Label.text = str(randi_range(999, 9999))
modulate.a *= 2
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _physics_process(_delta: float) -> void:
modulate.r = randi_range(0, 1)
modulate.g = randi_range(0, 1)
modulate.b = randi_range(0, 1)
position.y -= 2
modulate.a *= 0.98
if modulate.a < 0.0001: queue_free()
|