File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public struct SustKeys
1414
1515
1616}
17-
17+
1818
1919public 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
You can’t perform that action at this time.
0 commit comments