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

Administrator / pygame_lesson7_diy1

  • 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 aaf4416c authored a year ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 557fda13
Hide whitespace changes
Inline Side-by-side
Showing with 6 additions and 5 deletions
  • bush.png
  • my_game.py
bush.png
View file @ aaf4416c
bush.png

26.3 KB | W: | H:

bush.png

14.5 KB | W: | H:

bush.png
bush.png
bush.png
bush.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed. Click to expand it.
my_game.py
View file @ aaf4416c
...@@ -57,15 +57,16 @@ while True: ...@@ -57,15 +57,16 @@ while True:
hero_list+=1 hero_list+=1
if hero_list>len(hero)-1: if hero_list>len(hero)-1:
hero_list=0 hero_list=0
screen.blit(background, (0, 0))
screen.blit(road, (0, 500))
screen.blit(wukong, (150, y))
if rect.x <= 0-rect.width: if rect.x <= 0-rect.width:
b = random.choice([stone,cacti,bush]) b = random.choice([stone,cacti,bush])
rect=b.get_rect() rect=b.get_rect()
rect.x=1000 rect.x=1000
rect.y=500-rect.height rect.y=500-rect.height
rect.x-=8
screen.blit(b,(rect.x,rect.y)) screen.blit(b,(rect.x,rect.y))
screen.blit(background, (0, 0))
screen.blit(road, (0, 500))
screen.blit(wukong, (150, y))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPS.tick(60) FPS.tick(50)
\ No newline at end of file \ No newline at end of file
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