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 math
|
||||||
import random
|
import random
|
||||||
import colorsys
|
import colorsys
|
||||||
import signal
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
def signal_handler(sig, frame):
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
signal.signal(signal.SIGQUIT, signal_handler)
|
|
||||||
|
|
||||||
# Initialize Pygame
|
# Initialize Pygame
|
||||||
pygame.init()
|
pygame.init()
|
||||||
|
|
||||||
|
@ -87,6 +81,11 @@ while running:
|
||||||
d_spin = 0.1
|
d_spin = 0.1
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
|
for event in pygame.event.get():
|
||||||
|
if event.type == pygame.QUIT:
|
||||||
|
running = False
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
spinny -= d_spin
|
spinny -= d_spin
|
||||||
d_spin *= 1.0005
|
d_spin *= 1.0005
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue