public void setEdge(EdgeSO newEdge) { rewardEdge = newEdge; capture.gameObject.SetActive(true); capture.gameObject.transform.position = gameObject.transform.position; if (rewardEdge.getDescription().Equals("")) { capture.text = "DMG " + rewardEdge.getDamage() + "\nDEF " + rewardEdge.getDefense() + "\nHEAL " + rewardEdge.getHeal(); } else { capture.text = rewardEdge.getDescription(); } //gameObject.GetComponent<SpriteRenderer>().sprite = rewardEdge.getSprite(); }
public void randomizeEdge() { int index = Random.Range(0, 6); if (dice.getEdgeByIndex(index).isEdgeSpecial()) { currentSpecialEdge = (SpecialEdgeSO)dice.getEdgeByIndex(index); capture.text = currentSpecialEdge.getDescription(); if (currentSpecialEdge.getNumberOfBlockedDices() > 0) { roundController.blockDices(currentSpecialEdge.getNumberOfBlockedDices()); } if (currentSpecialEdge.isPassiveEdge() && !currentSpecialEdge.isRandomValues()) { roundController.applyPassiveModificator("DMG", currentSpecialEdge.getPassiveDamage()); roundController.applyPassiveModificator("DEF", currentSpecialEdge.getPassiveDefense()); roundController.applyPassiveModificator("HEAL", currentSpecialEdge.getPassiveHeal()); roundController.applyPassiveModificator("Reroll", currentSpecialEdge.getExtraRerolls()); } if (currentSpecialEdge.isPassiveEdge() && currentSpecialEdge.isRandomValues()) { roundController.applyPassiveModificator("DMG", Random.Range(currentSpecialEdge.getRandomDamageMin(), currentSpecialEdge.getRandomDamageMax() + 1)); roundController.applyPassiveModificator("DEF", Random.Range(currentSpecialEdge.getRandomDefenseMin(), currentSpecialEdge.getRandomDefenseMax() + 1)); roundController.applyPassiveModificator("HEAL", Random.Range(currentSpecialEdge.getRandomHealMin(), currentSpecialEdge.getRandomHealMax() + 1)); } currentEdge = null; } else { currentEdge = dice.getEdgeByIndex(index); capture.text = "DMG " + currentEdge.getDamage() + "\nDEF " + currentEdge.getDefense() + "\nHEAL " + currentEdge.getHeal(); currentSpecialEdge = null; } }
public void setCurrentEdge(EdgeSO newEdge) { currentEdge = newEdge; capture.text = "DMG " + currentEdge.getDamage() + "\nDEF " + currentEdge.getDefense() + "\nHEAL " + currentEdge.getHeal(); }