Commit 9fe33e17 by BellCodeEditor

save project

parent 5ae36158
Showing with 4 additions and 15 deletions
import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
bg=pygame.image.load("bg.png")
left=pygame.image.load("left.png")
apple=pygame.image.load("apple.png")
# 创建一个窗口
screen=pygame.display.set_mode((800,600))
while True:
for event in pygame.event.get():#获取事件
if event.type==locals.QUIT:
exit()
screen.blit(bg,(0,0))
screen.blit(left,(300,180))
screen.blit(left,(300,210))
screen.blit(apple,(600,390))
pygame.display.update()
\ No newline at end of file
screen=pygame.display.set_mode((800,600))
\ 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