Commit aa5f0eee by BellCodeEditor

auto save

parent c6188a1e
Showing with 43 additions and 8 deletions
import pygame
from pygame import locals
# 初始化pygame,为使用硬件做准备
pygame.init()
# 创建一个窗口
screen = pygame.display.set_mode((660, 480))
a=pygame.image.load("apple.png")
b=pygame.image.load("bg.png")
c=pygame.image.load("right.png")
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
screen.blit(a.png,(30,30))
screen.blit(b.png,(0,0))
screen.blit(c.png,(60,60))
pygame.display.update()
import pygame import pygame
from pygame import locals
# 初始化pygame,为使用pygame做准备 pygame.init()
pygame.init()
z = pygame.display.set_mode((660,400))
# 创建一个窗口 a = pygame.image.load('bg.png')
?? b = pygame.image.load("apple.png")
\ No newline at end of file c = pygame.image.load("right.png")
while True:
print()
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
z.blit(a,(0,0))
z.blit(b,(60,0))
z.blit(c,(90,60))
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