Commit e9b6d99a by BellCodeEditor

auto save

parent 7a075bcd
import pygame as nx
from pygame import locals
# 初始化pygame,为使用pygame做准备
nx.init()
background=nx.image.load('bg.png')
right=nx.image.load('right.png')
food=nx.image.load('apple.png')
body=nx.image.load('body.png')
# 创建一个窗口
modo=nx.display.set_mode((800,600))
\ No newline at end of file
modo=nx.display.set_mode((800,600))
while True:
for event in nx.event.get():
if event.type == locals.QUIT:
exit()
modo.blit(background,(0,0))
modo.blit(right,(240,120))
modo.blit(food,(360,300))
modo.blit(body,(210,120))
modo.blit(body,(180,120))
modo.blit(body,(180,90))
nx.display.update()
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