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

save project

parent 0328c340
Hide whitespace changes
Inline Side-by-side
Showing with 10 additions and 6 deletions
  • my_game.py
my_game.py
View file @ aef61162
......@@ -21,6 +21,7 @@ hero = [pygame.image.load('hero1.png'),
m = 0
j="runing"
y=400
t=30
while True:
for event in pygame.event.get():
......@@ -32,15 +33,18 @@ while True:
if j =="runing":
j="up"
if j =="up":
if y >150:
y=y-5
if t>0:
y=y-t
t-=2
else:
j="down"
if j=="down":
if y<400:
y=y+5
if j =="down":
if t<=30:
y=y+t
t+=2
else:
j="runing"
j="runing"
t=30
hero1=hero[m]
......
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