diff --git a/game/area_map/area_map.gd b/game/area_map/area_map.gd index e903885..5445a01 100644 --- a/game/area_map/area_map.gd +++ b/game/area_map/area_map.gd @@ -85,13 +85,13 @@ func _ready() -> void: func _input(event: InputEvent) -> void: if selected_sector == null: return - if event.is_action_pressed("ui_left"): + if event.is_action_pressed("ui_left") and selected_sector.sector_to_left: _set_selected_sector(selected_sector.sector_to_left) - if event.is_action_pressed("ui_right"): + if event.is_action_pressed("ui_right") and selected_sector.sector_to_right: _set_selected_sector(selected_sector.sector_to_right) - if event.is_action_pressed("ui_up"): + if event.is_action_pressed("ui_up") and selected_sector.sector_above: _set_selected_sector(selected_sector.sector_above) - if event.is_action_pressed("ui_down"): + if event.is_action_pressed("ui_down") and selected_sector.sector_below: _set_selected_sector(selected_sector.sector_below) if event.is_action_pressed("ui_accept"): var selected_passage := _get_passage_to_sector(selected_sector) diff --git a/game/game.gd b/game/game.gd index d51982c..0927a3c 100644 --- a/game/game.gd +++ b/game/game.gd @@ -82,6 +82,7 @@ func _create_passage(passage_data: PassageData) -> void: _current_passage_scene.data = passage_data _current_passage_scene.completed.connect(_show_map) + _current_passage_scene.player_died.connect(_on_passage_player_died) func _on_pause_screen_continue_game() -> void: