Kaynağa Gözat

frein acceleration souris

Haut-Bas-souris-frein-accélération
Maurice 3 yıl önce
ebeveyn
işleme
d8cd638565
1 değiştirilmiş dosya ile 15 ekleme ve 13 silme
  1. +15
    -13
      birdie.py

+ 15
- 13
birdie.py Dosyayı Görüntüle

@@ -4,28 +4,30 @@ TITLE = "Paf l'oiseau"
WIDTH = 400
HEIGHT = 708

def on_mouse_down():
print('Clic souris !')
titi.x = titi.x - 30
titi1.x = titi1.x - 100
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():
titi.x += 1
titi1.x += 1
if titi.left > WIDTH:
titi.right = 0
if titi.right <0:
titi.left = WIDTH

def update():
titi.x += titi.speed
titi1.x += titi1.speed
titi.y += titi.speed

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

titi = Actor ('bird1', (75,150))
titi1 = Actor ('bird2', (75,200))
titi = Actor ('bird1', (100,10))
titi.speed = 1
titi1.speed = 2



pgzrun.go()



Yükleniyor…
İptal
Kaydet