Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson5_diy1
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
38dfae25
authored
Apr 01, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
3e89fd1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
my_music.py
my_music.py
View file @
38dfae25
...
@@ -84,7 +84,8 @@ while True:
...
@@ -84,7 +84,8 @@ while True:
new_logo
=
pygame
.
transform
.
rotate
(
logo_img
,
angle
)
#让唱盘图片旋转
new_logo
=
pygame
.
transform
.
rotate
(
logo_img
,
angle
)
#让唱盘图片旋转
newRECT
=
new_logo
.
get_rect
(
center
=
(
320
,
200
))
#获取图片移到中心位置后包含左上角坐标和图片大小的元组
newRECT
=
new_logo
.
get_rect
(
center
=
(
320
,
200
))
#获取图片移到中心位置后包含左上角坐标和图片大小的元组
pos
=
(
newRECT
[
0
],
newRECT
[
1
])
#通过索引获取处于中心位置的唱片左上角坐标
pos
=
(
newRECT
[
0
],
newRECT
[
1
])
#通过索引获取处于中心位置的唱片左上角坐标
angle
+=
1
#在循环外设置初值为0
if
play_button
==
stop_img
:
#播放按钮为暂停造型时,即音乐正在播放时,angle+1
angle
+=
1
#在循环外设置初值为0
# 绘制画面
# 绘制画面
screen
.
blit
(
bg_img
,
(
0
,
0
))
# 填充背景
screen
.
blit
(
bg_img
,
(
0
,
0
))
# 填充背景
...
...
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