Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson6_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
272dec02
authored
a year ago
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
093dad79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
my_music.py
my_music.py
View file @
272dec02
...
...
@@ -83,11 +83,13 @@ while True:
num
=
0
pygame
.
mixer
.
music
.
load
(
path
+
"
\\
"
+
music_list
[
num
])
pygame
.
mixer
.
music
.
play
()
play_time
=
pygame
.
mixer
.
music
.
get_pos
()
play_time
=
int
(
play_time
/
1000
)
pm
=
play_time
//
60
ps
=
play_time
%
60
io
=
str
(
pm
)
+
":"
+
str
(
ps
)
new_logo
=
pygame
.
transform
.
rotate
(
logo_img
,
angle
)
newRect
=
new_logo
.
get_rect
(
center
=
(
320
,
200
))
pos
=
(
newRect
[
0
],
newRect
[
1
])
...
...
@@ -97,6 +99,13 @@ while True:
screen
.
blit
(
play_button
,
(
270
,
330
))
screen
.
blit
(
new_logo
,
pos
)
screen
.
blit
(
last_img
,
(
120
,
350
))
screen
.
blit
(
next_img
,
(
420
,
350
))
pygame
.
display
.
update
()
\ No newline at end of file
screen
.
blit
(
next_img
,
(
420
,
350
)
b
=
random
.
randint
(
0
,
255
)
n
=
random
.
randint
(
0
,
255
)
m
=
random
.
randint
(
0
,
255
)
scoreSurf
=
basic_font
.
render
(
info
,
True
,(
b
,
n
,
m
))
screen
.
blit
(
scoreSurf
,(
120
,
440
))
pygame
.
display
.
update
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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