Fixes a bug that let the player click on already cleared tracks in the frog minigame.
This commit is contained in:
@@ -81,10 +81,13 @@ func _create_tracks() -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _start_tracks() -> void:
|
func _start_tracks() -> void:
|
||||||
|
var is_first_track_enabled: bool = false
|
||||||
for track: LilypadTrack in lilypad_tracks_container.get_children():
|
for track: LilypadTrack in lilypad_tracks_container.get_children():
|
||||||
await track.reset()
|
await track.reset()
|
||||||
|
if not is_first_track_enabled:
|
||||||
|
track.is_enabled = true
|
||||||
|
is_first_track_enabled = true
|
||||||
track.start()
|
track.start()
|
||||||
lilypad_tracks_container.get_child(0).is_enabled = true
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,8 @@ func _set_highlighting(value: bool) -> void:
|
|||||||
#region Connections
|
#region Connections
|
||||||
|
|
||||||
func _on_lilypad_pressed(lilypad: Lilypad) -> void:
|
func _on_lilypad_pressed(lilypad: Lilypad) -> void:
|
||||||
|
if is_cleared:
|
||||||
|
return
|
||||||
audio_player.play()
|
audio_player.play()
|
||||||
stop()
|
stop()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user