Commit 02cb2711 by BellCodeEditor

auto save

parent 14e0ca00
Showing with 15 additions and 4 deletions
import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备
pygame.init()
bg_img = pygame.image.load("bg.png")
right = pygame.image.load("right.png")
food = pygame.image.load("apple.png")
# 创建一个窗口
screen = pygame.display.set_mode((660,480))
\ No newline at end of file
sc = pygame.display.set_mode((660,480))
while True:
for e in pygame.event.get():
if e.type ==locals.QUIT:
exit()
sc.blit(bg_img,(0,0))
sc.blit(right,(290,120))
sc.blit(food,(360,300))
pygame.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