Skip to content

Commit

Permalink
Merge pull request #3 from maartenba/TD-T-18
Browse files Browse the repository at this point in the history
TD-T-18 Make levels accessible only when previous levels completed
  • Loading branch information
maartenba committed Mar 14, 2024
2 parents 3477061 + 681cda1 commit 47e3963
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/Scripts/TowerDefense/UI/LevelSelectScreen.cs
Expand Up @@ -69,8 +69,9 @@ protected virtual void Start()
button.transform.localScale = Vector3.one;
m_Buttons.Add(button.GetComponent<Button>());

// TODO: add cheat code for game team to bypass this limitation
if (i > 0 && GameManager.instance != null &&
GameManager.instance.GetStarsForLevel(m_LevelList[i - 1].id) == 0)
GameManager.instance.GetStarsForLevel(m_LevelList[i - 1].id) == 0)
{
button.enabled = false;
button.GetComponent<Button>().interactable = false;
Expand Down

0 comments on commit 47e3963

Please sign in to comment.