Commit e025c045 by BellCodeEditor

save project

parent acba020f
Showing with 10 additions and 3 deletions
......@@ -64,6 +64,7 @@ score=0
speed=8
os=score
killer=False
p=0
class Rsc(pygame.sprite.Sprite):
def __init__(self,im1,im2,im3):
......@@ -101,7 +102,8 @@ while True:
obg=Rsc(stone,cacti,apple)
blist.add(obg)
time=10
speed=8+score//3
s_c=score//3
speed=8+s_c+p
if IM=='running':
ind+=1
if ind>=5:
......@@ -130,7 +132,12 @@ while True:
if event.key == locals.K_e:
killer=False
if event.key == locals.K_p:
speed+=10
p+=10
if event.key == locals.K_o:
p-=10
if event.key == locals.K_u:
obg=Rsc(stone,cacti,apple)
blist.add(obg)
if gametate==True:
if IM=='up':
y-=G
......@@ -158,7 +165,7 @@ while True:
herorun=hero[index]
# 将背景图画上去
bg_x-=2
bg_x-=speed//4
if bg_x<=-1000:
bg_x=0
screen.blit(bg, (bg_x, 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