소스 검색

chap1 challenge1 ok

chapitre-1-challenge-1
ophelie 3 년 전
부모
커밋
76fd540d07
1개의 변경된 파일14개의 추가작업 그리고 6개의 파일을 삭제
  1. +14
    -6
      birdie.py

+ 14
- 6
birdie.py 파일 보기

@@ -1,12 +1,20 @@
import pgzrun
# création fenêtre
TITLE = "Paf l'oiseau" # définition titre
WIDTH = 708 # largeur
HEIGHT = 400 #hauteur

TITLE = "Paf l'oiseau"
WIDTH = 400
HEIGHT = 708
def on_mouse_down(): # fonction 'si click avec souris'
print('Clique souris !') # sortie en terminal pour verifier si c'est ok
titi.x -= 100

def update():
titi.x += titi.speed # mise a jour (60x/sec) de titi

def draw():
titi = Actor('bird1', (75, 350))
screen.blit('cascade', (0, 0))
screen.blit('background', (0, 0)) # import arrière plan
titi.draw() # 'dessiner' titi

pgzrun.go()
titi = Actor('bird1', (75, 350)) # définir position de titi
titi.speed = 5 # définir vitesses de chute de titi
pgzrun.go() # syntaxe 'conventionnelle' de pgzero

불러오는 중...
취소
저장