소스 검색

ok

Haut-Bas-souris-frein-accélération
Maurice 3 년 전
부모
커밋
4b9f8e04de
2개의 변경된 파일47개의 추가작업 그리고 2개의 파일을 삭제
  1. +0
    -2
      birdie.py
  2. +47
    -0
      birdie000.py

+ 0
- 2
birdie.py 파일 보기

@@ -27,8 +27,6 @@ def draw():
titi = Actor ('bird1', (100,10))
titi.speed = 1



pgzrun.go()



+ 47
- 0
birdie000.py 파일 보기

@@ -0,0 +1,47 @@
import pgzrun

TITLE = "Paf l'oiseau"
WIDTH = 400
HEIGHT = 708

def on_mouse_down(button):
if button == mouse.LEFT:
print("freinage")
titi.speed -=1
elif button == mouse.RIGHT:
print ("Accélération")
titi.speed += 1

def update():
if titi.bottom > HEIGHT:
titi.top = 0
if titi.top <0:
titi.bottom = HEIGHT
if top.right > WIDTH:
top.left = 0
if top.left <0:
top.right = WIDTH
if top1.right > WIDTH:
top1.left = 0
if top1.left <0:
top1.right = WIDTH

titi.y += titi.speed
top.x += top.speed
top1.x += top1.speed

def draw():
screen.blit('background', (0, 0))
titi.draw()
top.draw()
top1.draw()
titi = Actor ('bird1', (200,50))
top = Actor ('top', (0,450) )
top1 = Actor ('top', (200,200))
titi.speed = 1
top.speed = 1
top1.speed = 1

pgzrun.go()



불러오는 중...
취소
저장