Commit 5cd53591 by BellCodeEditor

auto save

parent ffab4778
Showing with 36 additions and 4 deletions
import pygame
from pygame import locals
pygame.init()
sc = pygame.display.set_mode((660,480))
bg = pygame.image.load('bg.png')
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
exit()
sc.blit(bg,(0,0))
pygame.display.update()
\ No newline at end of file
import pygame
from pygame import locals
pygame.init()
scr = pygame.display.set_mode((660,480))
bg = pygame.image.load('bg.png')
ri = pygame.image.load('right.png')
fd = pygame.image.load('apple.png')
bd = pygame.image.load('body.png')
scr = pygame.display.set_mode((200,500))
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
if event.type == locals.MOUSEBUTTONDOWN:
exit()
if event.type == locals.MOUSEBUTTONUP:
exit()
\ No newline at end of file
scr.blit(fd,(240,240))
scr.blit(bg,(0,0))#画背景
scr.blit(ri,(210,210))
scr.blit(fd,(240,240))
scr.blit(bd,(180,210))
scr.blit(bd,(150,210))
scr.blit(bd,(150,180))
scr.blit(bd,(150,240))
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