Commit 80fd9ca4 by BellCodeEditor

save project

parent e8e7a0d6
Showing with 6 additions and 2 deletions
import pygame
from pygame import locals
SY=0
SY=0.2
pygame.init() # 初始化
# 创建窗口
screen = pygame.display.set_mode((640, 480))
......@@ -17,7 +17,11 @@ while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
if SY != 0 and KEYDONG
if event.type == locals.KEYDOWN:
if event.key == locals.K_UP and SY != 1:
SY=SY+0.1
if event.key == locals.K_DOWN and SY != 0:
SY=SY-0.1
if pygame.mixer.music.get_busy() == False:
pygame.mixer.music.play()
# 绘制画面
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment