int targetStack; //final numbers after the attack public void HeroIsDealingDamage(Hero atacker, Hero Target) { //calculates the final number of units in the regiment of the attacked hero targetStack = damageController.CountTargetStack(atacker, Target); int currentInt = Target.heroData.StackCurrent; //assigns a new value to the number of units of the attacked hero Target.heroData.StackCurrent = targetStack; Target.stack.StartCoroutine(Target.stack.CountDownToTargetStack(currentInt, targetStack)); }
int targetStack; // números finales después del ataque public void HeroIsDealingDamage(Hero atacker, Hero Target) { // calcula el número final de unidades en el regimiento del héroe atacado targetStack = damageController.CountTargetStack(atacker, Target); int currentInt = Target.heroData.StackCurrent; // asigna un nuevo valor al número de unidades del héroe atacado Target.heroData.StackCurrent = targetStack; Target.stack.StartCoroutine(Target.stack.CountDownToTargetStack(currentInt, targetStack)); }