Commit f6af1b13 by BellCodeEditor

save project

parent ced025d2
Showing with 8 additions and 3 deletions
import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
from pygame import locals
background = pygame.image.load('bg.png')
x = 800
y = 600
# 创建一个窗口
......@@ -14,4 +17,6 @@ while True:
x -= 20
y -= 20
screen = pygame.display.set_mode((x,y))
screen = pygame.display.set_mode((x,y))
\ No newline at end of file
screen = pygame.display.set_mode((x,y))
screen.blit(background,(10,10))
screen.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