void Awake() { UpgradeInfo.SetActive(false); _animator = GetComponent <Animator>(); _health = MaxHealth; _gameController = FindObjectOfType <GameController>(); _plantationManager = FindObjectOfType <PlantationManager>(); _currencyManager = FindObjectOfType <CurrencyManager>(); _upgradeManager = new PlantationUpgradeManager(); AssignHealthBar(); AddSpawnPoints(); SpawnTeaLeaf(); AssignUpgrades(); }
// Use this for initialization IEnumerator Start() { _shop = GameObject.Find("Shop"); _teapotManager = FindObjectOfType <TeapotManager>(); _plantationManager = FindObjectOfType <PlantationManager>(); _coffeeMakerPrefabs = new Dictionary <CoffeeMakerType, GameObject>() { { CoffeeMakerType.Cafetiere, _cafetiere }, { CoffeeMakerType.ItalianStove, _italianStove }, }; HideShop(); _randomGenerator = new System.Random(); _gameController = FindObjectOfType <GameController>(); _waves = SpawnWave.Levels; _nextWaveIndex = -1; yield return(SpawnNextWave()); }