Commit d8f272f4 by BellCodeEditor

auto save

parent 65874859
Showing with 14 additions and 0 deletions
......@@ -2,6 +2,18 @@ import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
bg = pygame.image.load('bg.png')
a = pygame.image.load('right.png')
b = pygame.image.load('apple.png')
c = pygame.image.load('body.png')
d = pygame.image.load('body.png')
e = pygame.image.load('body.png')
pygame.surface.blit(a,(240,120))
pygame.surface.blit(b,(240,210))
pygame.surface.blit(c,(210,120))
pygame.surface.blit(d,(180,120))
pygame.surface.blit(e,(180,90))
# 创建一个窗口
pygame.display.set_mode((660,480))
......@@ -9,3 +21,5 @@ while 1==1:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
screen.blit('bg'(0,0))
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