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

Administrator / pygame_lesson7_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 393c607d authored 7 months ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

auto save

parent 28aafcf4 c439984l1405p473a14330/cloud715817
Hide whitespace changes
Inline Side-by-side
Showing with 6 additions and 5 deletions
  • my_game.py
my_game.py
View file @ 393c607d
...@@ -27,8 +27,8 @@ while True: ...@@ -27,8 +27,8 @@ while True:
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if c=="runing": if c=="runing":
if event.key == locals.K_SPACE: if event.key == locals.K_SPACE:
c="up" c="up"
if c=="up": if c=="up":
if t > 0: if t > 0:
y-=t y-=t
...@@ -42,11 +42,12 @@ while True: ...@@ -42,11 +42,12 @@ while True:
else: else:
c="runing" c="runing"
t=30 t=30
b=hero[a] b=hero[a]
if c=="runing": if c=="runing":
a+=1 a+=1
if a==5: if a==5:
a=0 a=0
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) screen.blit(background, (0, 0))
......
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