Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
East_L228
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
East_L228
Commits
c863b38e
Commit
c863b38e
authored
May 13, 2020
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev commit
parent
2996131e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
Cartoon.ts
src/app/play/Cartoon.ts
+3
-3
play.component.ts
src/app/play/play.component.ts
+7
-0
No files found.
src/app/play/Cartoon.ts
View file @
c863b38e
...
...
@@ -71,7 +71,7 @@ export class Cartoon {
// 播放音乐
_playingNow
=
[]
audioCallback
=
{}
playAudio
=
function
(
key
,
now
=
false
,
callback
=
null
,
onplayingCallback
?,
loop
?)
{
playAudio
=
function
(
key
,
now
=
false
,
callback
=
null
,
loop
?,
onplayingCallback
?)
{
const
audio
=
this
.
audio
.
get
(
key
);
if
(
audio
)
{
if
(
now
)
{
...
...
@@ -93,10 +93,10 @@ export class Cartoon {
}
if
(
onplayingCallback
){
this
.
audioCallback
[
key
][
"
onplaying
"
]
=
()
=>
{
onplayingCallback
&&
onplayingCallback
()
onplayingCallback
&&
onplayingCallback
(
audio
)
}
audio
.
onplaying
=
()
=>
{
onplayingCallback
&&
onplayingCallback
()
onplayingCallback
&&
onplayingCallback
(
audio
)
}
}
audio
.
play
();
...
...
src/app/play/play.component.ts
View file @
c863b38e
...
...
@@ -224,6 +224,9 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
m_enableAutoRunFocus
=
true
;
this
.
autoRunFocus
()
this
.
initShowCard
();
this
.
g_cartoon
.
playAudio
(
"
sm-run
"
,
false
,
null
,
true
,
(
audio
)
=>
{
audio
.
volume
=
0.3
})
}
cleanGameVar
(){
...
...
@@ -298,6 +301,7 @@ export class PlayComponent implements OnInit, OnDestroy {
this
.
subscribeMapDownEvent
(
element
.
id
,
()
=>
{
if
(
this
.
m_enableCamera
){
this
.
m_enableCamera
=
false
;
this
.
g_cartoon
.
stopAudio
(
"
sm-run
"
)
clearTimeout
(
this
.
m_autoFocusID
)
this
.
g_cartoon
.
playAudio
(
"
sm-camera
"
)
this
.
g_cartoon
.
getCartoonElement
(
`card-show`
).
show
(()
=>
{
...
...
@@ -598,6 +602,9 @@ export class PlayComponent implements OnInit, OnDestroy {
if
(
imageIndex
!=-
1
){
element
.
ref
.
children
.
splice
(
imageIndex
,
1
)
}
this
.
g_cartoon
.
playAudio
(
"
sm-run
"
,
false
,
null
,
true
,
(
audio
)
=>
{
audio
.
volume
=
0.3
})
callback
&&
callback
()
})
...
...
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