Fix issues with puzzle loading order and add saving state when using Menu
This commit is contained in:
committed by
Michal Pikulski
parent
c527ba334d
commit
717deee0cd
@@ -255,9 +255,9 @@ namespace Levels
|
||||
if (_switchData == null)
|
||||
return;
|
||||
|
||||
var data = SaveLoadManager.Instance?.currentSaveData;
|
||||
// Use the new public API to check unlock status
|
||||
string minigameName = _switchData.targetMinigameSceneName;
|
||||
bool unlocked = data?.unlockedMinigames != null && !string.IsNullOrEmpty(minigameName) && data.unlockedMinigames.Contains(minigameName);
|
||||
bool unlocked = SaveLoadManager.Instance != null && SaveLoadManager.Instance.IsMinigameUnlocked(minigameName);
|
||||
|
||||
// Show/hide padlock
|
||||
if (padlockImage) padlockImage.gameObject.SetActive(!unlocked);
|
||||
|
||||
Reference in New Issue
Block a user