IndieBrosCEO / Tetrahedron

This is the Final Project for P5 AP Computer science Principles
0 stars 1 forks source link

health bar #9

Open Descrates opened 6 years ago

Descrates commented 6 years ago

def health_bars(player_health, enemy_health): if player_health > 75: player_health_color = green elif player_health > 50: player_health_color = yellow else: player_health_color = red

if enemy_health > 75:
    enemy_health_color = green
elif enemy_health > 50:
    enemy_health_color = yellow
else:
    enemy_health_health_color = red

pygame.draw.rect(gameDisplay, player_health_color, (680, 25, player_health, 25))
pygame.draw.rect(gameDisaply, enemy_health_color, (20, 25, enemy_health, 25))
Descrates commented 6 years ago

https://www.youtube.com/watch?v=TcnWjyHVaOs