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")
|
||||||
|
@ -25,9 +29,6 @@ func collect():
|
||||||
Player.stream = load("res://collectables/crystal/sounds/Picked Coin Echo 2.wav")
|
Player.stream = load("res://collectables/crystal/sounds/Picked Coin Echo 2.wav")
|
||||||
|
|
||||||
Player.play();
|
Player.play();
|
||||||
|
|
||||||
if value > 99.0:
|
|
||||||
value = 100.0
|
|
||||||
|
|
||||||
signal complete
|
signal complete
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user