Bläddra i källkod

Changements

bird2
Eica2020! 3 år sedan
förälder
incheckning
442b306cde
1 ändrade filer med 30 tillägg och 1 borttagningar
  1. +30
    -1
      birdie.py

+ 30
- 1
birdie.py Visa fil

@@ -1 +1,30 @@
print('Hello world !')
import pgzrun

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

def on_mouse_down():#Arrête l'itération quand on clic sur la souris
print('clic souris !')
#titi.x == StopIteration
#titi.y == StopIteration
titi.x += 30 # équivalent à titi.y = titi.y - 50
titi.y -= 30

def on_mouse_up():#Avance quand on lache la souris
print("Don't clic souris ! " )
def draw():
screen.blit('cascade', (0, 0))
titi.draw()

titi = Actor('bird1', (0, 0))

def update():
titi.y += titi.speed
titi.speed = 1




pgzrun.go()

Laddar…
Avbryt
Spara