WorldMapManager

Placed once in the world map scene. On start it finds all LevelMarker instances in the scene, initializes them, and locks markers for levels that are not yet available.

Methods

MethodDescription
OpenLevelInfoScreen(LevelInfo level)Opens the LevelInfoScreen panel and populates it with the data for level. Called automatically when the player clicks a LevelMarker.

LevelMarker

Attach to each level node in the world map scene. A marker can reference child markers that unlock when this level is completed, forming the unlock chain for the world map progression.

Inspector Fields

FieldTypeDescription
activeboolWhether this level is currently unlocked and selectable.
levelLevelInfoThe level asset this marker represents.
childsLevelMarker[]Markers that become active when this level is completed.
starRendererSpriteRendererRenderer used to display the star-rating sprite after the level is completed.
starsSpritesSprite[]Star sprites indexed by star count (index 0 = 1 star, 1 = 2 stars, 2 = 3 stars).

Methods

MethodDescription
Initialize()Loads saved level data, updates the star sprite to reflect the player's best result, and activates child markers if this level has been completed. Called by WorldMapManager on start.
CheckCompleted()Re-evaluates completion state and activates or deactivates child markers accordingly. Call this after a level result is saved to refresh the map without reloading the scene.