void Ladder(WSB_Pot _pot) { // Exit if growing a seed isn't possible if (!_pot.GrowSeed("Ladder")) { return; } // Reduce ladder charges and update corresponding UI ladderCharges--; spells.UpdateChargesUI(/*SpellType.Ladder,*/ ladderCharges.ToString()); if (ladderCharges == 0) { spells.UpdateEmptyCharges(/*SpellType.Ladder,*/ 0); } }
void Carnivore(WSB_Pot _pot) { // Exit if growing a seed isn't possible if (!_pot.GrowSeed("Carnivore")) { return; } // Reduce carnivore charges and update corresponding UI carnivoreCharges--; spells.UpdateChargesUI(/*SpellType.Carnivore,*/ carnivoreCharges.ToString()); if (carnivoreCharges == 0) { spells.UpdateEmptyCharges(/*SpellType.Carnivore,*/ 0); } }
void Trampoline(WSB_Pot _pot) { // Exit if growing a seed isn't possible if (!_pot.GrowSeed("Trampoline")) { return; } // Reduce trampoline charges and update corresponding UI trampolineCharges--; spells.UpdateChargesUI(/*SpellType.Trampoline,*/ trampolineCharges.ToString()); if (trampolineCharges == 0) { spells.UpdateEmptyCharges(/*SpellType.Trampoline,*/ 0); } }
void Bridge(WSB_Pot _pot) { // Exit if growing a seed isn't possible if (!_pot.GrowSeed("Bridge")) { return; } // Deploy bridge and gives it the direction it needs to grow _pot.GrownSeed.GetComponent <WSB_Bridge>().StartCoroutine(_pot.GrownSeed.GetComponent <WSB_Bridge>().DeployBridge(transform.position.x < _pot.transform.position.x)); // Reduce bridge charges and update corresponding UI bridgeCharges--; spells.UpdateChargesUI(/*SpellType.Bridge,*/ bridgeCharges.ToString()); if (bridgeCharges == 0) { spells.UpdateEmptyCharges(/*SpellType.Bridge,*/ 0); } }