isn:pygame03
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| isn:pygame03 [2019/11/14 11:06] – [La fonction rotate] techer.charles_educ-valadon-limoges.fr | isn:pygame03 [2019/11/14 11:17] (Version actuelle) – [Les activités ...] techer.charles_educ-valadon-limoges.fr | ||
|---|---|---|---|
| Ligne 53: | Ligne 53: | ||
| x_fraise = 50 | x_fraise = 50 | ||
| y_fraise = 50 | y_fraise = 50 | ||
| - | largeur_fraise = 40 | ||
| - | hauteur_fraise = 40 | ||
| - | IMG_FRAISE = pygame.image.load(" | ||
| - | # image Ballon | + | IMG_FRAISE |
| - | x_ballon = 10 | + | # |
| - | y_ballon = 10 | + | |
| - | largeur_ballon = 20 | + | |
| - | hauteur_ballon = 20 | + | |
| - | IMG_BALLON | + | |
| - | ballonSpeed = [1, 0] | + | |
| - | #IMG_BALLON.move(ballonSpeed) | + | |
| - | ballonRect | + | |
| while not ARRET: | while not ARRET: | ||
| pygame.time.delay(100) | pygame.time.delay(100) | ||
| Ligne 73: | Ligne 64: | ||
| sys.exit() | sys.exit() | ||
| elif event.type == pygame.KEYDOWN: | elif event.type == pygame.KEYDOWN: | ||
| + | # symétrie axiale | ||
| if event.key == pygame.K_RIGHT: | if event.key == pygame.K_RIGHT: | ||
| - | | + | |
| + | elif event.key == pygame.K_UP: | ||
| + | IMG_FRAISE = pygame.transform.flip(IMG_FRAISE, | ||
| + | # rotation | ||
| elif event.key == pygame.K_LEFT: | elif event.key == pygame.K_LEFT: | ||
| - | | + | |
| - | + | # redimensionner | |
| - | ECRAN.blit(IMG_FRAISE, | + | elif event.key == pygame.K_DOWN: |
| - | + | | |
| - | ECRAN.blit(IMG_BALLON, | + | |
| - | ballonRect | + | |
| - | if ballonRect.right > LARGEUR: | + | |
| - | | + | |
| - | | + | ECRAN.blit(IMG_FRAISE, |
| + | | ||
| </ | </ | ||
| ==== Les activités ... ==== | ==== Les activités ... ==== | ||
| Ligne 93: | Ligne 85: | ||
| - | https:// | + | https:// |
| < | < | ||
| - | <iframe height=" | + | <iframe height=" |
| </ | </ | ||
isn/pygame03.1573725982.txt.gz · Dernière modification : 2019/11/14 11:06 de techer.charles_educ-valadon-limoges.fr
