Commit f34a7655 by BellCodeEditor

save project

parent 00e70cf8
Showing with 4 additions and 2 deletions
...@@ -18,6 +18,7 @@ hero = [pygame.image.load('hero1.png'), ...@@ -18,6 +18,7 @@ hero = [pygame.image.load('hero1.png'),
a=0 a=0
index = 0 index = 0
y=400 y=400
c="run"
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -27,12 +28,13 @@ while True: ...@@ -27,12 +28,13 @@ while True:
if a==5: if a==5:
a=0 a=0
b=hero[a] b=hero[a]
if
if y>150: if y>150:
y-=5 y-=5
screen.blit(wukong,(150,y)) screen.blit(cow,(150,y))
if y<400: if y<400:
y+=5 y+=5
screen.blit(wukong,(400,y)) screen.blit(cow,(400,y))
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
screen.blit(road, (0, 500)) screen.blit(road, (0, 500))
......
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