Bläddra i källkod

chapitre.1-start-base

chapitre-1-start
antoine 3 år sedan
förälder
incheckning
df70f51914
1 ändrade filer med 8 tillägg och 27 borttagningar
  1. +8
    -27
      birdie.py

+ 8
- 27
birdie.py Visa fil

@@ -4,39 +4,20 @@ TITLE = "Paf l'oiseau"
WIDTH = 400
HEIGHT = 700

titi = Actor('bird1', (300,10))
titi2 = Actor('bird2', (125,75))
pot1 = Actor('top',(300,-100))
pot2 = Actor('bottom',(300,800))
titi = Actor('bird1',(75,350))

titi.speed = 1

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

def on_mouse_down():
print('Clic souris !')
titi.speed = 0
titi2.speed = 0

def on_mouse_up():
print('clic souris !')
titi.speed = 2
titi2.speed = 2

print('Clic souris!')
titi.y -= 50
def update():
titi.y += titi.speed
titi2.x += titi2.speed
if titi.y > 700 :
if titi.y > 700:
titi.y = 0
if titi2.x > 400 :
titi2.x = 0



titi.speed = 1
titi2.speed = 1

pgzrun.go()
pgzrun.go()

Laddar…
Avbryt
Spara