right now im trying to make it so ive got 1 character and 3 enemies if my character dies its suppossed to give game over or something but i cant make it to work(if enemies dies it works tho i dont know why)
here is what im doing bool Exit = false; bool CharDead = false;
Heroe Heroe1 = p.ElementAt(0);
Enemigo Enemigo1 = l.ElementAt(0);
Enemigo Enemigo2 = l.ElementAt(1);
Enemigo Enemigo3 = l.ElementAt(2);
a.Agregar(comienza);
List<Items> item = new List<Items>();
do
{
if (Heroe1.HP > 0)
AccionesHeroe1(l, p);
if (Enemigo1.HP > 0)
AccionesEnemigo1(l, p);
if (Enemigo2.HP > 0)
AccionesEnemigo2(l, p);
if (Heroe1.HP > 0)
AccionesHeroe1(l, p);
else
CharDead = true;
if (Enemigo3.HP > 0)
AccionesEnemigo3(l, p);
if (Heroe1.HP <= 0)
{
CharDead = true;
}
if (Enemigo1.HP <= 0 && Enemigo2.HP <= 0 && Enemigo3.HP <= 0)
{
Exit = true;
}
} while (Exit == false || CharDead == false);