Commit c1283d49 by BellCodeEditor

auto save

parent 14068ae7
Showing with 22 additions and 3 deletions
import pygame
from pygame import locals
screen=pygame.display.set_mode((660,480))
bg=pygame.image.load("bg.png")
apple=pygame.image.load("apple.png")
body=pygame.image.load("body.png")
right=pygame.image.load("right.png")
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
screen.blit(bg,(0,0))
screen.blit(body,(210,120))
screen.blit(body,(180,120))
screen.blit(body,(180,90))
screen.blit(right,(240,120))
screen.blit(apple,(240,300))
pygame.display.update()
\ No newline at end of file
import pygame# 初始化pygame,为使用pygame做准备
import pygame # 初始化pygame,为使用pygame做准备
pygame.init()
from pygame import locals
screen=pygame.display.set_mode((660,480))
back=pygame.image.load("bg.png")# 创建一个窗口
bg=pygame.image.load("bg.png")# 创建一个窗口
body=pygame.image.load("body.png")
right=pygame.image.load("right.png")
apple=pygame.image.load("apple.png")
......@@ -10,7 +10,7 @@ while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
screen.blit(back,(0,0))
screen.blit(bg,(0,0))
screen.blit(body,(210,120))
screen.blit(body,(180,120))
screen.blit(body,(180,90))
......
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