소스 검색

code fini sauf tubes

master
valdoucet 3 년 전
부모
커밋
7535a6be75
1개의 변경된 파일34개의 추가작업 그리고 14개의 파일을 삭제
  1. +34
    -14
      code.py

+ 34
- 14
code.py 파일 보기

@@ -3,27 +3,47 @@ import pgzrun
TITLE = "vava bird"
WIDTH = 490
HEIGHT = 490

tb = Actor("bottom", (500, 600))
th = Actor("top", (500, -100))
oiseau = Actor("bird1", (245, 15))
end = 0
d = 2
g = 1
g = 2
c = -35
gm = -2
def draw():
screen.blit("back", (0, 0))
oiseau.draw()
th.draw()
tb.draw()

def update():
global d
if oiseau.y < 470:
oiseau.x += d
if oiseau.y < 470:
oiseau.y += d
if oiseau.y >= 470:
print("Game Over")
global end
if oiseau.y == 475 and end == 0:
print("--Game over--")
end = 1

if oiseau.y < 475 and end == 0:
th.x += gm
tb.x += gm

if oiseau.y <= 15:
oiseau.y == 15

if end == 0 and (oiseau.colliderect(tb) or oiseau.colliderect(th)):
print("--Game over--")
end = 1

if oiseau.y < 475 and end == 0 :
oiseau.y += g


def on_mouse_down():
print ('')
if oiseau.y > 15:
oiseau.y += c

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

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

pgzrun.go()

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