Commit e025c045 by BellCodeEditor

save project

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