MCPcopy Index your code
hub / github.com/geekcomputers/Python / draw_health_bar

Function draw_health_bar

Street_Fighter/src/main.py:345–349  ·  view source on GitHub ↗
(health, x, y)

Source from the content-addressed store, hash-verified

343
344
345def draw_health_bar(health, x, y):
346 pygame.draw.rect(screen, BLACK, (x, y, 200, 20))
347 if health > 0:
348 pygame.draw.rect(screen, RED, (x, y, health * 2, 20))
349 pygame.draw.rect(screen, WHITE, (x, y, 200, 20), 2)
350
351
352def countdown():

Callers 1

game_loopFunction · 0.85

Calls 1

rectMethod · 0.45

Tested by

no test coverage detected