Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-libs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
劳工
zeroing-libs
Commits
82952c24
Commit
82952c24
authored
Dec 30, 2019
by
XieChuanJin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复音频内存泄漏
parent
72a15644
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
33 deletions
+47
-33
shoot-planet.json
dist/customs/shoot-planet.json
+1
-1
SoundMgr.ts
src/custom/shoot-planet/Mgr/SoundMgr.ts
+2
-1
test.js
src/custom/shoot-planet/test.js
+44
-31
No files found.
dist/customs/shoot-planet.json
View file @
82952c24
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/custom/shoot-planet/Mgr/SoundMgr.ts
View file @
82952c24
...
@@ -18,7 +18,8 @@ export default class SoundMgr {
...
@@ -18,7 +18,8 @@ export default class SoundMgr {
if
(
!
this
.
enabled
)
return
;
if
(
!
this
.
enabled
)
return
;
engine
.
playSound
(
nameToUuid
[
name
],
{
engine
.
playSound
(
nameToUuid
[
name
],
{
loop
:
false
loop
:
false
,
keep
:
true
},
name
);
},
name
);
}
}
...
...
src/custom/shoot-planet/test.js
View file @
82952c24
le
t
share
=
{
cons
t
share
=
{
title
:
engine
.
env
.
shareTitle
,
title
:
engine
.
env
.
shareTitle
,
desc
:
engine
.
env
.
shareDesc
,
desc
:
engine
.
env
.
shareDesc
,
link
:
engine
.
env
.
shareLink
,
link
:
window
.
location
.
href
,
imgUrl
:
engine
.
env
.
shareImgUrl
imgUrl
:
engine
.
env
.
shareImgUrl
};
};
Net
.
sendGet
(
"/wechatShare/getShareInfo/v2"
,
{
wxdebug
:
false
,
url
:
window
.
location
.
href
},
(
res
)
=>
{
wx
.
config
({
debug
:
false
,
appId
:
res
.
wxappid
,
timestamp
:
res
.
wxtimestamp
,
nonceStr
:
res
.
wxnonceStr
,
signature
:
res
.
wxsignature
,
jsApiList
:
[
'checkJsApi'
,
'onMenuShareTimeline'
,
'onMenuShareAppMessage'
]
});
wx
.
error
(
function
(
res
)
{
console
.
error
(
"wx error"
,
res
);
});
const
share
=
args
;
wx
.
ready
(
function
()
{
wx
.
onMenuShareTimeline
({
wx
.
onMenuShareTimeline
({
title
:
share
.
title
,
title
:
share
.
title
,
desc
:
share
.
desc
,
desc
:
share
.
desc
,
link
:
share
.
url
,
link
:
share
.
link
,
imgUrl
:
share
.
imgUrl
,
imgUrl
:
share
.
imgUrl
,
success
:
function
()
{
success
:
function
()
{
mui
.
Toast
.
show
(
"分享成功"
);
engine
.
globalEvent
.
dispatchEvent
(
"ShareSuccess"
);
engine
.
globalEvent
.
dispatchEvent
(
"ShareSuccess"
);
},
},
cancel
:
function
()
{
cancel
:
function
()
{
engine
.
globalEvent
.
dispatchEvent
(
"ShareCancel"
);
mui
.
Toast
.
show
(
"分享取消"
);
}
engine
.
globalEvent
.
dispatchEvent
(
"ShareCancel"
);
});
}
});
wx
.
onMenuShareAppMessage
({
wx
.
onMenuShareAppMessage
({
title
:
share
.
title
,
title
:
share
.
title
,
desc
:
share
.
desc
,
desc
:
share
.
desc
,
link
:
share
.
url
,
link
:
share
.
link
,
imgUrl
:
share
.
imgUrl
,
imgUrl
:
share
.
imgUrl
,
success
:
function
()
{
success
:
function
()
{
mui
.
Toast
.
show
(
"分享成功"
);
engine
.
globalEvent
.
dispatchEvent
(
"ShareSuccess"
);
engine
.
globalEvent
.
dispatchEvent
(
"ShareSuccess"
);
},
},
cancel
:
function
()
{
cancel
:
function
()
{
engine
.
globalEvent
.
globa
.
dispatchEvent
(
"ShareCancel"
);
mui
.
Toast
.
show
(
"分享取消"
);
}
engine
.
globalEvent
.
globa
.
dispatchEvent
(
"ShareCancel"
);
});
}
});
});
},
()
=>
{
console
.
error
(
"get wx config error"
);
});
\ No newline at end of file
\ 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