Commit 9716f7cd by BellCodeEditor

auto save

parent d177a298
Showing with 17 additions and 0 deletions
import pygame
from pygame import locals
pygame.init()
pygame.mixer.init()
window=pygame.display.set_mode((660,480))
bg=pygame.image.load('background.png')
pygame.mixer.music.load('Alarm_Rooster_02.ogg')
pygame.mixer.music.play()
while True:
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
window.blit(bg,(0,0))
pygame.display.update()
\ No newline at end of file
......@@ -2,6 +2,7 @@ import pygame
from pygame import locals
#初始化
pygame.init()
pygame.mixer.init()
# 创建窗口
screen=pygame.display.set_mode((660,480))
# 载入图片、资源
......
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