Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson9_diy2
This project
Loading...
Sign in
Toggle navigation
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
2c556431
authored
Mar 12, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
7d157eb6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
my_game.py
record.txt
my_game.py
View file @
2c556431
...
@@ -121,9 +121,13 @@ while True:
...
@@ -121,9 +121,13 @@ while True:
if
(
sprite
.
rect
.
x
+
sprite
.
rect
.
width
)
<
wukong
.
rect
.
x
:
if
(
sprite
.
rect
.
x
+
sprite
.
rect
.
width
)
<
wukong
.
rect
.
x
:
sprite
+=
sprite
.
score
sprite
+=
sprite
.
score
sprite
.
score
=
0
sprite
.
score
=
0
if
score
>
old_score
:
score_audio
old_score
=
score
scoreSurf
=
basic_font
.
render
(
"分数:"
+
str
(
score
),
True
,(
255
,
255
,
255
))
scoreSurf
=
basic_font
.
render
(
"分数:"
+
str
(
score
),
True
,(
255
,
255
,
255
))
screen
.
blit
(
scoreSurf
,(
880
,
20
))
screen
.
blit
(
scoreSurf
,(
880
,
20
))
# 刷新画面
# 刷新画面
pygame
.
display
.
update
()
pygame
.
display
.
update
()
FPS
.
tick
(
60
)
FPS
.
tick
(
60
)
\ No newline at end of file
record.txt
View file @
2c556431
{"第1名": 0, "第2名": 0, "第3名": 0}
bors=['i,t,y']
\ No newline at end of file
for i in range((bors)):
print(bors[i+1])
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment