void SetNumTowers() { int towersBefore = pti.MaxNumberOfTowers; if (score < 10) { pti.MaxNumberOfTowers = 1; } else if (score < 30) { pti.MaxNumberOfTowers = 2; } else if (score < 60) { pti.MaxNumberOfTowers = 3; } else if (score < 120) { pti.MaxNumberOfTowers = 4; } else if (score >= 240) { pti.MaxNumberOfTowers = 5; } else { pti.MaxNumberOfTowers = 5; } if (towersBefore != pti.MaxNumberOfTowers) { InfoText.SetText("You gained a new tower! Don't forget to place it."); } }
public void ShowInfo(string s) { GameObject obj = PrefabUtils.CreateGameObjectToParent(InfoRoot.gameObject, infoPrefab); obj.SetActive(true); InfoText info = obj.GetComponent <InfoText>(); info.SetText(s); }
void OnMouseOver() { InfoText.SetText(InfoString()); }
public void BirdKilled() { FireRate -= FireRateBuffPerParrot; InfoText.SetText("Bird kill: Fire rate increased!"); }