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

auto save

parent 24ad999c c150647l1437p256a14520/cloud546886
Hide whitespace changes
Inline Side-by-side
Showing with 5 additions and 10 deletions
  • my_game.py
  • record.txt
my_game.py
View file @ 5d86bd6b
...@@ -69,7 +69,7 @@ while True: ...@@ -69,7 +69,7 @@ while True:
if jumpState == "runing": if jumpState == "runing":
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
jumpState = "up" jumpState = "up"
speed = 8 + score // 3 speed = 10 + score // 3
# 悟空造型 # 悟空造型
wukong = Player(hero[index]) wukong = Player(hero[index])
if jumpState == "runing": # 跑步状态下 if jumpState == "runing": # 跑步状态下
...@@ -86,13 +86,8 @@ while True: ...@@ -86,13 +86,8 @@ while True:
else: else:
jumpState = "down" jumpState = "down"
if jumpState == "down": # 降落状态 if jumpState == "down": # 降落状态
if t <= 30: if t <= 30
y += t 30
wukong.rect.y = y
t += 2
else:
jumpState = "runing"
t =30
# 将背景图画上去 # 将背景图画上去
bg_x -= 1 bg_x -= 1
......
This diff is collapsed. Click to expand it.
record.txt
View file @ 5d86bd6b
{"第1名": 4, "第2名": 1, "第3名": 0} {"第1名": 5, "第2名": 4, "第3名": 4}
\ 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