Commit 0e1a8296 by BellCodeEditor

save project

parent eab4e64c
Showing with 24 additions and 3 deletions
import pygame import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
# 初始化pygame,为使用硬件做准备
pygame.init() pygame.init()
q = pygame.image.load('apple.png')
w = pygame.image.load('body.png')
e = pygame.image.load('right.png')
r = pygame.image.load('bg.png')
# 创建一个窗口 # 创建一个窗口
a=pygame.display.set_mode((660,480)) a = pygame.display.set_mode((660, 480))
\ No newline at end of file
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
a.blit(r,(0,0))
a.blit(q,(120,120))
a.blit(w,(180,120))
a.blit(e,(210,120))
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