Commit b0bfc996 by BellCodeEditor

save project

parent fc99f79f
Showing with 5 additions and 2 deletions
...@@ -64,7 +64,7 @@ while True: ...@@ -64,7 +64,7 @@ while True:
if index >= 5: if index >= 5:
index = 0 index = 0
# 将背景图画上去 # 将背景图画上去
shan_x-=2 snan_x-=2
if shan_x<-1000: if shan_x<-1000:
shan_x=0 shan_x=0
screen.blit(background, (shan_x, 0)) # 远处背景 screen.blit(background, (shan_x, 0)) # 远处背景
...@@ -78,7 +78,9 @@ while True: ...@@ -78,7 +78,9 @@ while True:
# 创建障碍物对象 # 创建障碍物对象
aa=Block(bush,cacti,stone) aa=Block(bush,cacti,stone)
aa.rect.x -= 8 aa.rect.x -= 8
screen.blit(aa.image,(aa.rect.x,aa.rect.y))
screen.blit(aa.image, (aa.rect.x, aa.rect.y))
# 刷新画面 # 刷新画面
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