Commit 510af73c by BellCodeEditor

auto save

parent 29e63c3e
Showing with 4 additions and 2 deletions
...@@ -2,6 +2,8 @@ import pygame ...@@ -2,6 +2,8 @@ import pygame
from pygame import locals from pygame import locals
pygame.init() # 初始化 pygame.init() # 初始化
#添加标题
pygame.display.set_caption("悟空酷跑")
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((1000, 600)) screen = pygame.display.set_mode((1000, 600))
FPS = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数) FPS = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
...@@ -57,8 +59,7 @@ while True: ...@@ -57,8 +59,7 @@ while True:
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
screen.blit(road, (0, 500)) screen.blit(road, (0, 500))
screen.blit(wukong, (150, y)) screen.blit(wukong, (150, y))
#添加标题
pygame.display.set_caption("悟空酷跑")
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(60) FPS.tick(60)
\ 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