資源簡(jiǎn)介
游戲,蝸牛繞墻爬
代碼片段和文件信息
import?pygame
import?sys
from?pygame.locals?import?*
pygame.init()
size=widthheight=640480
bg=(255255255)
clock=pygame.time.Clock()
screen=pygame.display.set_mode(size)
#screen=pygame.display.set_mode(sizeFULLSCREEN|HWSURFACE)
pygame.display.set_caption(“蝸牛繞墻爬!“)
turtle=pygame.image.load(“woniu.JPG“)
turtle=pygame.transform.flip(turtleTrueTrue)
position=turtle_rect=turtle.get_rect()
speed=[50]
turtle_right=pygame.transform.rotate(turtle90)
turtle_top=pygame.transform.rotate(turtle180)
turtle_left=pygame.transform.rotate(turtle270)
turtle_bottom=turtle
turtle=turtle_top
while?True:
????for?event?in?pygame.event.get():
????????if?event.type==QUIT:
????????????sys.exit()
????position=position.move(speed)
????if?position.right>width:
????????turtle=t
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????25457??2019-11-18?23:14??woniu.jpg
?????文件????????1571??2019-11-18?23:09??04gamepg_4.py
評(píng)論
共有 條評(píng)論