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

Administrator / pygame_lesson9_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 5a54418c authored 4 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent b24e8d02
Show whitespace changes
Inline Side-by-side
Showing with 3 additions and 3 deletions
  • my_game.py
my_game.py
View file @ 5a54418c
...@@ -45,7 +45,7 @@ basic_font=pygame.font.Font('STKAITI.TTF',17) ...@@ -45,7 +45,7 @@ basic_font=pygame.font.Font('STKAITI.TTF',17)
index = 0 index = 0
y = 400 y = 400
jumpState = "runing" jumpState = "runing"
t = 100 t = 300
road_x = 0 road_x = 0
bg_x = 0 bg_x = 0
time = 0 time = 0
...@@ -81,13 +81,13 @@ while True: ...@@ -81,13 +81,13 @@ while True:
else: else:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 降落状态 if jumpState == "down": # 降落状态
if t <= 100: if t <= 300:
y += t y += t
wukong.rect.y = y wukong.rect.y = y
t += 2 t += 2
else: else:
jumpState = "runing" jumpState = "runing"
t =100 t =300
# 将背景图画上去 # 将背景图画上去
bg_x -= 1 bg_x -= 1
......
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