Parcourir la source

python

master
valdoucet il y a 3 ans
Parent
révision
cf5e76a0c3
1 fichiers modifiés avec 24 ajouts et 0 suppressions
  1. +24
    -0
      code.py

+ 24
- 0
code.py Voir le fichier

@@ -0,0 +1,24 @@
import pgzrun

TITLE = "vava bird"
WIDTH = 490
HEIGHT = 490

d = 2

def update():
global d
if oiseau.x >= 470 and d > 0:
d = -d
if oiseau.x <= 20 and d < 0:
d = -d
oiseau.x += d


def draw():
screen.blit("back", (0, 0))
oiseau.draw()

oiseau = Actor("bird1", (20, 15))

pgzrun.go()

Chargement…
Annuler
Enregistrer