Skip to content

Commit

Permalink
HITO 2
Browse files Browse the repository at this point in the history
Último bug arreglado:
Al coger una batería, la hud ya no se bugea.
  • Loading branch information
AlvaroCuerva committed Apr 28, 2020
1 parent 375c13e commit 993b9cf
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Assets/Scripts/UIManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,24 @@ public void masEnergia(int maximo)
public void DevuelveEnergia(int energy)
{
int dif = energy - aux;
if (energy == 7)
if (energy < 8)
{
for (int i = 0; i < dif; i++)
{
bat[energy - i - 1].enabled = true;
}
}
else
else// bateria = 8
{
for (int i = 0; i < dif; i++)
{
if ((energy - i - 2) != -1)
bat[energy - i - 2].enabled = true;
for (int i = 0; i < dif; i++)
{
if ((energy - i - 2) != -1)
bat[energy - i - 2].enabled = true;
}
batextra.enabled = true;
}
batextra.enabled = true;

}
//if (maxbat == 8 ) batextra.enabled = true;
}
Expand Down

0 comments on commit 993b9cf

Please sign in to comment.