Skip to content

Commit

Permalink
Fix Issue With Modal Menu (#62)
Browse files Browse the repository at this point in the history
* Fix errors in editor for terrain generator

* Hide Modal when not paused
  • Loading branch information
JP-Dhabolt authored Oct 20, 2024
1 parent c8c4acc commit 37603fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions game/scenes/interface/MenuModal/MenuModal.gd
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ func _ready():
if hide_quit_on_plaform:
desktop_exit_button.queue_free()

hide()

func pause():
show()
animation_player.play("Pause")
get_tree().paused = true
continue_button.grab_focus()

func unpause():
animation_player.play("Unpause")
hide()
get_tree().paused = false

func _unhandled_input(event: InputEvent) -> void:
Expand Down
2 changes: 2 additions & 0 deletions game/scenes/systems/TerrainGenerator/TerrainGenerator.gd
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ func _determine_y_value(x: int):
return min_y + int(normalized_noise * y_range)

func redraw_terrain():
if not is_node_ready():
return
ground_layer.clear()

for obj in instance_dict.values():
Expand Down

0 comments on commit 37603fd

Please sign in to comment.