Add level progression and UI updates; implement death screen and marketplace features
This commit is contained in:
@@ -126,8 +126,10 @@ func unlock_level(level_index: int) -> void:
|
||||
|
||||
|
||||
func try_to_go_to_next_level() -> void:
|
||||
if player_state["current_level"] + 1 < level_scenes.size() and player_state["current_level"] + 1 in player_state["unlocked_levels"]:
|
||||
var next_level = player_state["current_level"] + 1
|
||||
if next_level < level_scenes.size() and next_level in player_state["unlocked_levels"]:
|
||||
player_state["current_level"] += 1
|
||||
get_tree().change_scene_to_packed(level_scenes[next_level])
|
||||
|
||||
|
||||
func quit_game() -> void:
|
||||
@@ -139,4 +141,4 @@ func pause_game() -> void:
|
||||
|
||||
|
||||
func resume_game() -> void:
|
||||
Engine.time_scale = 1
|
||||
Engine.time_scale = 1
|
||||
|
Reference in New Issue
Block a user