Commit cc17cafc by BellCodeEditor

save project

parent c1e46823
Showing with 16 additions and 4 deletions
import pygame import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备 # 初始化pygame,为使用pygame做准备
pygame.init() pygame.init()
a = pygame.image.load('bg.png')
s = pygame.image.load('body.png')
d = pygame.image.load('right.png')
f = pygame.image.load('apple.png')
# 创建一个窗口 # 创建一个窗口
setattr=pygame.display.set_mode((600,800)) screen=pygame.display.set_mode((600,800))
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
screen.blit(a,(0,0))
screen.blit(s,(60,60))
screen.blit(d,(90,60))
screen.blit(s,(30,60))
screen.blit(f,(120,40))
pygame.display.update()
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