Commit 7f0179d8 by BellCodeEditor

auto save

parent d9f6e227
Showing with 24 additions and 0 deletions
import pygame
from pygame import locals
pygame.init()
a=pygame.display.set_mode((660,800))
b=pygame.image.load('狗.webp')
shetou=right
while True:
for event in pygame.event.get():
print(event)
if event.type == locals.QUIT:
exit()
if event.type == locals.KEYDOWN:
if event.key == locals.K_UP and shetou!=down:
shetou=up
if event.key == locals.K_DOWN and shetou!=up:
shetou=down
if event.key == locals.K_RIGHT and shetou!=left:
shetou=right
if event.key == locals.K_LEFT and shetou!=right:
shetou=left
a.blit(b,(0,0))
pygame.display.update()
\ No newline at end of file
File added
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