Commit 2d460ef3 by BellCodeEditor

save project

parent a89a2997
Showing with 27 additions and 0 deletions
import pygame
from pygame import locals
pygame.init()
background=pygame.image.load('bg.png')
right=pygame.image.load('right.png')
food=pygame.image.load('apple.png')
body=pygame.image.load('body.png')
scree=pygame.display.set_mode((660,480))
while True:
for event in pygame.event.get():
#print(event)
if event.type==locals.QUIT:
exit()
scree.blit(background,(0,0))
scree.blit(right,(240,120))
scree.blit(food,(360,300))
scree.blit(body,(210,120))
scree.blit(body,(180,120))
scree.blit(body,(180,90))
pygame.display.update()
\ No newline at end of file
import pygame
# 初始化pygame,为使用硬件做准备
pygame.init()
# 创建一个窗口
screen = pygame.display.set_mode((660, 480), 0, 32)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment