Commit 209cc334 by BellCodeEditor

auto save

parent 418cf893
Showing with 29 additions and 4 deletions
...@@ -14,11 +14,36 @@ hero = [pygame.image.load('hero1.png'), ...@@ -14,11 +14,36 @@ hero = [pygame.image.load('hero1.png'),
pygame.image.load('hero3.png'), pygame.image.load('hero3.png'),
pygame.image.load('hero4.png'), pygame.image.load('hero4.png'),
pygame.image.load('hero5.png')] pygame.image.load('hero5.png')]
bg_x=0 #背景x坐标
class Block(pygame.sprite.Sprite):
def __init__(self,image1,image2,image3):
super().__init__()
self.image=random.choice([image1,image2,image3])
self.rect=self.image.get_rect()
self.rect.x=1000
self.rect.y=500-self.rect.height
self.score=1
class Wukong(pygame.sprite.Sprite):
def __init__(self,image):
super().__init__()
self.image=image
self.rect=self.image.get_rect()
self.rect.x=150
self.rect.y=400
score=0
index = 0
y = 400
time=0
t=30
jumpstate="run"
lu=road.get_rect()
lu.x=0
bg_x=0
gamestate= True
jingling_list=pygame.sprite.Group()
my_font=pygame.font.Font('STKAITI.TTF',18)
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:
......
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