Fixed it, but better
This commit is contained in:
parent
2b407587e8
commit
27150a2cb7
1 changed files with 5 additions and 6 deletions
11
wheel.py
11
wheel.py
|
@ -3,14 +3,8 @@ import time
|
|||
import math
|
||||
import random
|
||||
import colorsys
|
||||
import signal
|
||||
import sys
|
||||
|
||||
def signal_handler(sig, frame):
|
||||
sys.exit(0)
|
||||
|
||||
signal.signal(signal.SIGQUIT, signal_handler)
|
||||
|
||||
# Initialize Pygame
|
||||
pygame.init()
|
||||
|
||||
|
@ -87,6 +81,11 @@ while running:
|
|||
d_spin = 0.1
|
||||
|
||||
while 1:
|
||||
for event in pygame.event.get():
|
||||
if event.type == pygame.QUIT:
|
||||
running = False
|
||||
sys.exit(0)
|
||||
|
||||
spinny -= d_spin
|
||||
d_spin *= 1.0005
|
||||
|
||||
|
|
Loading…
Reference in a new issue