Add marketplace button functionality and skill unlocker integration

This commit is contained in:
2025-06-05 22:50:45 +02:00
parent 87b85cae43
commit cc737f22cf
16 changed files with 167 additions and 7 deletions

View File

@@ -68,6 +68,14 @@ func get_kid_nodes() -> Array[CollectableComponent]:
return kid_nodes
func get_player_node() -> Node:
for node in nodes_in_scene:
if node is PlayerController:
return node
return null
func add_coins(amount: int) -> void:
player_state["coins"] += amount
player_state["coins"] = max(0, player_state["coins"])
@@ -213,7 +221,6 @@ func on_level_complete() -> void:
SaveSystem.save_game()
func get_unlocked_skills() -> Array:
var skills_unlocked = player_state.get("unlocked_skills", [])
var skills_current_session = current_session_state.get("skills_unlocked", [])