sorting and PLF example 2 with modern form.
a lot of C# to be real!
This commit is contained in:
@@ -8,7 +8,7 @@ pygame.init()
|
||||
# Screen setup
|
||||
WIDTH, HEIGHT = 800, 600
|
||||
screen = pygame.display.set_mode((WIDTH, HEIGHT))
|
||||
pygame.display.set_caption("Enhanced Physics Bouncing Balls")
|
||||
pygame.display.set_caption("balls")
|
||||
|
||||
# Colors
|
||||
BLACK = (0, 0, 0)
|
||||
@@ -259,15 +259,15 @@ while running:
|
||||
|
||||
# Physics info
|
||||
font = pygame.font.SysFont(None, 22)
|
||||
info = [
|
||||
f"Gravity: {gravity:.2f} (↑↓) Elasticity: {elasticity:.2f} (←→)",
|
||||
f"Air Resistance: {air_resistance:.3f} (WS) Balls: {len(balls)}",
|
||||
f"SPACE: Add ball C: Clear Drag to throw!"
|
||||
]
|
||||
# info = [
|
||||
# f"Gravity: {gravity:.2f} Elasticity: {elasticity:.2f} (←→)",
|
||||
# f"Air Resistance: {air_resistance:.3f} (WS) Balls: {len(balls)}",
|
||||
# f"SPACE: Add ball C: Clear Drag to throw!"
|
||||
# ]
|
||||
|
||||
for i, text in enumerate(info):
|
||||
surface = font.render(text, True, WHITE)
|
||||
screen.blit(surface, (10, 10 + i * 25))
|
||||
# for i, text in enumerate(info):
|
||||
# surface = font.render(text, True, WHITE)
|
||||
# screen.blit(surface, (10, 10 + i * 25))
|
||||
|
||||
pygame.display.flip()
|
||||
clock.tick(FPS)
|
||||
|
||||
Reference in New Issue
Block a user