void PurchaseWolfCooldown() { if ((currentWoolCost <= GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>().woolTotal) && (currentWoolCost != -1)) { BigBadWolfController wolf = GameObject.FindGameObjectWithTag("Wolf").GetComponent <BigBadWolfController>(); switch (wolf.blowingCooldown) { case 11: wolf.blowingCooldown = 7.5f; break; case 7.5f: wolf.blowingCooldown = 5.5f; break; case 5.5f: break; } GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>().woolTotal -= currentWoolCost; } }
void PurchaseWolfBlowingPower() { if ((currentWoolCost <= GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>().woolTotal) && (currentWoolCost != -1)) { BigBadWolfController wolf = GameObject.FindGameObjectWithTag("Wolf").GetComponent <BigBadWolfController>(); switch (wolf.blowingCountdown) { case 0.3f: wolf.blowingCountdown = 0.4f; break; case 0.4f: wolf.blowingCountdown = 0.6f; break; case 0.6f: break; } GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>().woolTotal -= currentWoolCost; } }