i want to make a food bar, but i don’t know how i finish my code, i have this:
public int food = 100;
public GUITexture food100;
public GUITexture food70;
public GUITexture food40;
public GUITexture food10;
void OnGUI()
{
if(food == 100)
{
}
if(food <= 70)
{
}
if(food -= 40)
{
}
if(food <= 10)
{
}
}
what i need to put in:
if(food -= 10)
{
}
to destroy the old image and put the new one?