Commit 2b868c0e by BellCodeEditor

auto save

parent 0aedb70c
Showing with 17 additions and 2 deletions
#导入
import pygame
#导入locals模块
from pygame import locals
#初始化pygame
pygame.init()
#创建窗口
screen = pygame.display.set_mode((660,480))
\ No newline at end of file
screen = pygame.display.set_mode((660,480))
#导入图片
pygame.image.load('bg.png')
pygame.image.load('apple.png')
pygame.image.load('right.png')
#保留窗口(无限循环)
while True:
#事件监听
for event in pygame.event.get():
#退出窗口
if event.type == locals.QUIT:
exit()
#将背景渲染到窗口上
pygame.surface.blit(0,0)
\ 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