Commit a47e4729 by BellCodeEditor

auto save

parent cb0066c8
grass.png

70.1 KB

class A:
def func (self,name):
print(name)
def aa():
yase = A()
yase.func("亚瑟")
\ No newline at end of file
class Animals:
def run():
print("动物正在跑")
class pig (Animals):
def run():
print("猪正在跑")
class dog (Animals):
def run():
print("狗正在跑")
hole.png

248 Bytes

......@@ -11,7 +11,9 @@ background = pygame.image.load('bg.png') # 背景
road = pygame.image.load('road.png') # 路
stone = pygame.image.load('stone.png') # 石头
cacti = pygame.image.load('cacti.png') # 仙人掌
bush = pygame.image.load('bush.png') # 灌木丛
bush = pygame.image.load('bush.png')
hole = pygame.image.load('hole.png')
grass = pygame.image.load('grass.png') # 灌木丛
heroes = [pygame.image.load('hero1.png'),pygame.image.load('hero2.png'),pygame.image.load('hero3.png'),pygame.image.load('hero4.png'),pygame.image.load('hero5.png'),]
state = "moving"
i=0
......@@ -20,11 +22,11 @@ t=30
road_x=0
bg_x=0
block=random.choice([stone,cacti,bush])
block=random.choice([grass,hole,stone,cacti,bush])
rect=block.get_rect()
rect.x=1000+rect.width
rect.y=500-rect.height
clock=random.choice([stone,cacti,bush])
clock=random.choice([grass,hole,stone,cacti,bush])
crect=clock.get_rect()
crect.x=1000+crect.width+random.randint(100,400)
if crect.x-rect.x<70 or crect.x-rect.x>-70:
......
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