mirror of
https://github.com/mightypanders/GMTKJam2021.git
synced 2025-01-30 13:49:54 +01:00
drop off points change color, are bigger
This commit is contained in:
parent
5f29b5992f
commit
a153c58f66
@ -12,7 +12,6 @@ var colorList = [
|
||||
Color.violet,
|
||||
Color.red,
|
||||
Color.turquoise,
|
||||
Color.orange
|
||||
]
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
@ -22,15 +21,16 @@ var colorList = [
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
modulate_color()
|
||||
|
||||
func modulate_color():
|
||||
rng.randomize()
|
||||
var n = rng.randi_range(0,4)
|
||||
var n = rng.randi_range(0,colorList.size()-1)
|
||||
print(n)
|
||||
destinationColor = colorList[n]
|
||||
print(destinationColor)
|
||||
sprite.modulate = destinationColor
|
||||
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
#func _process(delta):
|
||||
# pass
|
||||
func _on_Timer_timeout():
|
||||
modulate_color()
|
||||
|
@ -18,4 +18,11 @@ shape = SubResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
rotation = 0.785398
|
||||
scale = Vector2( 3, 3 )
|
||||
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"]
|
||||
|
Loading…
Reference in New Issue
Block a user