Skip to content

Commit 810bf77

Browse files
change
1 parent 9cec285 commit 810bf77

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Assets/Scripts/Managers/LevelManager.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public struct SustKeys
1414

1515

1616
}
17-
17+
1818

1919
public class LevelManager : MonoBehaviour
2020
{
@@ -23,7 +23,7 @@ public class LevelManager : MonoBehaviour
2323
private int TestNumberOfTurnsToPassLevelCounter = 0;
2424
public bool TEST_MODE;
2525
LevelInfo levelInfo;
26-
26+
public Button[] lvlButtons;
2727

2828
public static LevelManager Instance { get; private set; }
2929

@@ -59,6 +59,17 @@ void Start()
5959
sKeys.clean = 0;
6060
//Debug.LogFormat("GetTotalPopulation: number of buildings: {0}", BuildingsManager.buildingManager.buildings.Count);
6161

62+
int levelAt = PlayerPrefs.GetInt("levelAt", 2);
63+
64+
for (int i = 0; i < lvlButtons.Length; i++)
65+
{
66+
if (i + 2 > levelAt)
67+
lvlButtons[i].interactable = false;
68+
}
69+
70+
71+
72+
6273

6374
}
6475

0 commit comments

Comments
 (0)