Fixed sound
This commit is contained in:
parent
9a4a244f27
commit
d75c4bd024
|
@ -17,6 +17,10 @@ func _ready() -> void:
|
||||||
func collect():
|
func collect():
|
||||||
print("Collected crystal")
|
print("Collected crystal")
|
||||||
value += addAmount
|
value += addAmount
|
||||||
|
|
||||||
|
if value > 99.0:
|
||||||
|
value = 100.0
|
||||||
|
|
||||||
if value != 100.0:
|
if value != 100.0:
|
||||||
Player.pitch_scale = rng.randf_range(0.5, 2.0)
|
Player.pitch_scale = rng.randf_range(0.5, 2.0)
|
||||||
Player.stream = load("res://collectables/crystal/sounds/Picked Coin Echo.wav")
|
Player.stream = load("res://collectables/crystal/sounds/Picked Coin Echo.wav")
|
||||||
|
@ -26,9 +30,6 @@ func collect():
|
||||||
|
|
||||||
Player.play();
|
Player.play();
|
||||||
|
|
||||||
if value > 99.0:
|
|
||||||
value = 100.0
|
|
||||||
|
|
||||||
signal complete
|
signal complete
|
||||||
|
|
||||||
func _on_value_changed(value: float) -> void:
|
func _on_value_changed(value: float) -> void:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user