Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / pygame_lesson8_diy4

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 746b7a4b authored 3 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 8b9dc27e
Hide whitespace changes
Inline Side-by-side
Showing with 2 additions and 2 deletions
  • lesson8-diy2.py
lesson8-diy2.py
View file @ 746b7a4b
......@@ -51,7 +51,7 @@ bg_x = 0
road_x = 0
a=True
score=0
spen=8
block_list=pygame.sprite.Group()
# 创建障碍物
#obstacle = Block(bush,cacti,stone)
......@@ -107,7 +107,7 @@ while True:
obstacle=Block(bush,cacti,stone)
block_list.add(obstacle)
for sprite in block_list:
sprite.rect.x -=8
sprite.rect.x -=spen
screen.blit(sprite.image,(sprite.rect.x,sprite.rect.y)
if sprite.rect.x <= 0-sprite.rect.width:
sprite.kill()
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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