private void Awake() { baloonGenerator = FindObjectOfType <BaloonGenerator>(); policeLevel = GetComponent <PoliceLevel>(); level = GetComponent <Level>(); baloonGenerator.enabled = false; baloonGenerator.OnTimeFinihed += Finished; }
void Start() { if (Settings.difficult == Settings.Difficult.Easy) { progressBar.maxValue = 3.0f; } else if (Settings.difficult == Settings.Difficult.Medium) { progressBar.maxValue = 6.0f; } else if (Settings.difficult == Settings.Difficult.Hard) { progressBar.maxValue = 9.0f; } baloonGenerator = FindObjectOfType <BaloonGenerator>(); baloonGenerator.enabled = false; //progressBar.maxValue = maxProgress; }