Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM_L5_26
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
YM_L5_26
Commits
d2859736
Commit
d2859736
authored
Jun 24, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 右下角播放按钮
parent
2bbabd5a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
Game.ts
src/app/play/game/Game.ts
+3
-1
MyGame.ts
src/app/play/game/MyGame.ts
+6
-4
No files found.
src/app/play/game/Game.ts
View file @
d2859736
...
...
@@ -52,7 +52,9 @@ export class Game {
_currentPlayingAudioName
;
_currentPlayingAudioCallback
;
playAudio
(
key
,
now
=
true
,
callback
=
null
)
{
if
(
key
==
''
)
{
return
;
}
if
(
this
.
_currentPlayingAudioName
!=
''
)
{
const
audio
=
this
.
_parent
.
audioObj
[
this
.
_currentPlayingAudioName
];
if
(
audio
)
{
...
...
src/app/play/game/MyGame.ts
View file @
d2859736
...
...
@@ -291,10 +291,12 @@ export class MyGame extends Game {
totalAudioBtn
.
y
=
this
.
_parent
.
canvasHeight
-
totalAudioBtn
.
height
;
totalAudioBtn
.
addTouchBeganListener
(()
=>
{
jelly
(
totalAudioBtn
);
if
(
this
.
data
.
totalAudio
!=
''
)
{
this
.
playAudio
(
this
.
data
.
totalAudio
,
true
,
()
=>
{
totalAudioBtn
.
init
(
this
.
images
.
get
(
'
btn_play
'
));
});
totalAudioBtn
.
init
(
this
.
images
.
get
(
'
btn_pause
'
));
}
});
this
.
addChild
(
totalAudioBtn
);
}
...
...
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