Commit 355782b0 by BellCodeEditor

save project

parent c6188a1e
Showing with 37 additions and 5 deletions
import pygame
pygame.init()
from pygame import locals
d=pygame.display.set_mode((660,480))
bg=pygame.image.load('bg.png')
f=pygame.time.Clock()
while True:
for a in pygame.event.get():
if a.type==locals.QUIT:
exit()
d.blit(bg,(0,0))
f.tick(1.5)
pygame.display.update()
\ No newline at end of file
import pygame
# 初始化pygame,为使用pygame做准备
from pygame import locals
pygame.init()
s=pygame.display.set_mode((660,480))
f=pygame.time.Clock()
q=pygame.image.load('bg.png')
t=pygame.image.load('apple.png')
r=pygame.image.load('right.png')
b=pygame.image.load('body.png')
x=240
y=120
while True:
for a in pygame.event.get():
if a.type==locals.QUIT:
exit()
x+=30
# 创建一个窗口
??
\ No newline at end of file
s.blit(q,(0,0))
s.blit(t,(360,300))
s.blit(r,(x,y))
s.blit(b,(210,120))
s.blit(b,(180,120))
s.blit(b,(150,120))
f.tick(1.5)
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