Flash oxygen when low.

This commit is contained in:
Steve 2018-02-18 11:52:40 +00:00
parent 7affe23a99
commit daeaa28e88
1 changed files with 4 additions and 0 deletions

View File

@ -155,6 +155,10 @@ static void drawOxygen(void)
w = world.bob->oxygen / 5; w = world.bob->oxygen / 5;
drawRect(65, 58, w, 18, 0, 112, 225, 255); drawRect(65, 58, w, 18, 0, 112, 225, 255);
if (world.frameCounter % 60 < 30 && getPercent(world.bob->oxygen, MAX_OXYGEN) <= 33)
{
drawRect(65, 58, w, 18, 255, 225, 255, 255);
}
w = MAX_OXYGEN / 5; w = MAX_OXYGEN / 5;