drop off points change color, are bigger

This commit is contained in:
mightypanders 2021-06-13 18:05:10 +02:00
parent 5f29b5992f
commit a153c58f66
2 changed files with 13 additions and 6 deletions

View File

@ -12,7 +12,6 @@ var colorList = [
Color.violet, Color.violet,
Color.red, Color.red,
Color.turquoise, Color.turquoise,
Color.orange
] ]
# Declare member variables here. Examples: # Declare member variables here. Examples:
@ -22,15 +21,16 @@ var colorList = [
# Called when the node enters the scene tree for the first time. # Called when the node enters the scene tree for the first time.
func _ready(): func _ready():
modulate_color()
func modulate_color():
rng.randomize() rng.randomize()
var n = rng.randi_range(0,4) var n = rng.randi_range(0,colorList.size()-1)
print(n) print(n)
destinationColor = colorList[n] destinationColor = colorList[n]
print(destinationColor) print(destinationColor)
sprite.modulate = destinationColor sprite.modulate = destinationColor
func _on_Timer_timeout():
# Called every frame. 'delta' is the elapsed time since the previous frame. modulate_color()
#func _process(delta):
# pass

View File

@ -18,4 +18,11 @@ shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="."] [node name="Sprite" type="Sprite" parent="."]
rotation = 0.785398 rotation = 0.785398
scale = Vector2( 3, 3 )
texture = ExtResource( 1 ) texture = ExtResource( 1 )
[node name="Timer" type="Timer" parent="."]
wait_time = 10.0
autostart = true
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]