Commit cd04f661 by BellCodeEditor

save project

parent abdcc7d2
Showing with 10 additions and 9 deletions
......@@ -20,15 +20,16 @@ while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
elif event.type==locals.K_RIGHT:
if lie[1]<15:
lie[1]+=1
elif event.type==locals.K_LEFT:
if lie[1]>1:
lie[1]-=1
elif event.type==locals.K_DOWN:
if lie[1]<25:
lie[0]+=1
if event.type==locals.KEYDOWN:
elif event.key==locals.K_RIGHT:
if lie[1]<15:
lie[1]+=1
elif event.key==locals.K_LEFT:
if lie[1]>1:
lie[1]-=1
elif event.key==locals.K_DOWN:
if lie[0]<25:
lie[0]+=1
# 将背景图画上去
screen.blit(background,(0,0))
......
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