exo birdie et titi de Greg
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

titi_grominet.py 914 B

il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
il y a 3 ans
123456789101112131415161718192021222324252627282930313233343536373839
  1. import pgzrun
  2. TITLE = "Paf l'oiseau"
  3. WIDTH = 400
  4. HEIGHT = 708
  5. # deplacement stoppé au click
  6. def on_mouse_down():
  7. print('Stop me !')
  8. titi.y -= 0 # deplacement horizontal
  9. titi.x += 0 # deplacement latéral
  10. grominet.y -= 0 # deplacement horizontal
  11. grominet.x += 0 # deplacement latéral
  12. titi.speed = 0
  13. grominet.speed = 0
  14. # cela correspond a stopper deplacement des perso
  15. def draw():
  16. screen.blit('meme', (0, 0))
  17. titi.draw()
  18. grominet.draw()
  19. #titi = Actor('bird1', (70, 40))
  20. titi = Actor('titi', (200, 60))
  21. grominet = Actor('grominet', (70, 40))
  22. #(70, 350) le premier chiffre position de depart sur axe x
  23. # le deuxieme chiffre position axe y
  24. def update():
  25. titi.y += titi.speed
  26. grominet.y += grominet.speed
  27. #titi.x += tit.speed fera deplacer lateralement
  28. #si on modifie le 1 on augmente la vitesse de la chute
  29. titi.speed = 1
  30. grominet.speed = 1
  31. pgzrun.go()