void PurchaseShearikenAccuracy() { if ((currentWoolCost <= GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>().woolTotal) && (currentWoolCost != -1)) { LongController sheariken = GameObject.FindGameObjectWithTag("LongGun").GetComponent <LongController>(); switch (sheariken.PassEnemies) { case 0: sheariken.PassEnemies = 1; break; case 1: sheariken.PassEnemies = 2; break; case 2: break; } GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>().woolTotal -= currentWoolCost; } }
void PurchaseShearikenDamage() { if ((currentWoolCost <= GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>().woolTotal) && (currentWoolCost != -1)) { LongController sheariken = GameObject.FindGameObjectWithTag("LongGun").GetComponent <LongController>(); switch (sheariken.Damage) { case 1.0f: sheariken.Damage = 1.5f; break; case 1.5f: sheariken.Damage = 2.0f; break; case 2.0f: break; } GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController>().woolTotal -= currentWoolCost; } }