Hi guy. I have a problem with this script because I can not set that if it is less than an amount appears a texture if it is less than an 'other it appears another. Who can help me, please? I think I expressed myself badly cmq me reading the script you will better understand … Help!!!
function OnGUI()
{
if(batteryCount "What do I put here?" 8)
{
GUI.Label(Rect(10, 725, 125, 125), Battery100);
}
else if(batteryCount "What do I put here?" 6)
{
GUI.Label(Rect(10, 725, 125, 125), Battery75);
}
else if(batteryCount "What do I put here?" 4)
{
GUI.Label(Rect(10, 725, 125, 125), Battery50);
}
else if(batteryCount "What do I put here?" 2)
{
GUI.Label(Rect(10, 725, 125, 125), Battery25);
}
else if(batteryCount "What do I put here?" 0)
{
GUI.Label(Rect(10, 725, 125, 125), Battery0);
}
}
The code of Decrease Battery is BatteryCount -= Time.deltaTime;