浏览代码

new

chapitre-1-challenge-1
Michael 3 年前
父节点
当前提交
7ccc306720
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. +5
    -2
      birdie.py

+ 5
- 2
birdie.py 查看文件

@@ -9,19 +9,22 @@ titi2 = Actor('birddead', (11, 250))


def draw(): def draw():
screen.blit('background', (0, 0)) screen.blit('background', (0, 0))
screen.blit('bottom', (0, 0))
titi.draw() titi.draw()
titi2.draw() titi2.draw()



def on_mouse_down(): def on_mouse_down():
print('Clic souris !') print('Clic souris !')
titi.speed += 1
titi2.speed += 4
titi.y -= 15
titi2.y += 15


def on_mouse_up(): def on_mouse_up():
titi.speed += 1 titi.speed += 1
titi2.speed += 4 titi2.speed += 4
def update(): def update():
print(titi.speed, titi2.speed )
if titi.x>400: if titi.x>400:
titi.x = 0 titi.x = 0


正在加载...
取消
保存