Commit 35ef9ecf by BellCodeEditor

auto save

parent 502a59c4
Showing with 23 additions and 2 deletions
import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
background=pygame.image.load('bg.png')
a=pygame.image.load('apple.png')
c=pygame.image.load('body.png')
w=pygame.image.load('down.png')
l=pygame.image.load('left.png')
# 创建一个窗口
??
\ No newline at end of file
screen=pygame.display.set_mode(size=(660,480))
while True:
for event in pygame.event.get():
print(event)
if event.type==locals.QUIT:
exit()
screen.blit(background,(0,0))
screen.blit(w,(240,120))
screen.blit(c,(240,90))
screen.blit(c,(240,60))
screen.blit(c,(210,60))
screen.blit(a,(30,30))
pygame.display.update()
\ No newline at end of file
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