Commit 8b63abee by BellCodeEditor

save project

parent d13fb2a8
Showing with 9 additions and 5 deletions
import pygame import pygame
pygame.init() pygame.init()
a=pygame.display.set_mode((800,600)) a=pygame.display.set_mode((800,600))
time=pygame.time.Clock()
x,y=300,150
while True: while True:
for i in pygame.event.get(): for i in pygame.event.get():
if i.type==pygame.QUIT: if i.type==pygame.QUIT:
exit() exit()
x+=-30
a.blit(pygame.image.load('bg.png'),(0,0)) a.blit(pygame.image.load('bg.png'),(0,0))
a.blit(pygame.image.load('apple.png'),(90,120)) a.blit(pygame.image.load('apple.png'),(90,120))
a.blit(pygame.image.load('left.png'),(210,150)) a.blit(pygame.image.load('left.png'),(x,y))
a.blit(pygame.image.load('body.png'),(240,150)) a.blit(pygame.image.load('body.png'),(x+30,y))
a.blit(pygame.image.load('body.png'),(270,150)) a.blit(pygame.image.load('body.png'),(x+60,y))
a.blit(pygame.image.load('body.png'),(270,180)) a.blit(pygame.image.load('body.png'),(x+90,y))
pygame.display.update() 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