Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Sbx_pageturn
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
Sbx_pageturn
Commits
29638ee1
Commit
29638ee1
authored
Nov 23, 2020
by
asdf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
骨骼播放第一个动画,背景音乐降低声音
parent
698cc0e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
ItemPage.js
play/assets/tmpGame/script/ItemPage.js
+10
-6
Scene.js
play/assets/tmpGame/script/Scene.js
+1
-1
No files found.
play/assets/tmpGame/script/ItemPage.js
View file @
29638ee1
...
...
@@ -68,9 +68,9 @@ cc.Class({
var
imageUrl
=
this
.
data
.
tex_png
;
var
skeUrl
=
this
.
data
.
ske_json
;
var
atlasUrl
=
this
.
data
.
tex_json
;
//
imageUrl = 'http://127.0.0.1/walkingfish_tex.png';
//
skeUrl = 'http://127.0.0.1/walkingfish_ske.json';
//
atlasUrl = 'http://127.0.0.1/walkingfish_tex.json';
imageUrl
=
'
http://127.0.0.1/walkingfish_tex.png
'
;
skeUrl
=
'
http://127.0.0.1/walkingfish_ske.json
'
;
atlasUrl
=
'
http://127.0.0.1/walkingfish_tex.json
'
;
cc
.
assetManager
.
loadAny
([{
url
:
atlasUrl
,
ext
:
'
.txt
'
},
{
url
:
skeUrl
,
ext
:
'
.txt
'
}],
(
error
,
assets
)
=>
{
if
(
error
)
{
console
.
log
(
error
)
...
...
@@ -92,8 +92,12 @@ cc.Class({
this
.
dragonBone
.
dragonAtlasAsset
=
atlas
;
this
.
dragonBone
.
dragonAsset
=
asset
;
this
.
dragonBone
.
armatureName
=
'
Armature
'
;
let
data
=
asset
.
_dragonBonesJsonData
.
armature
[
0
];
if
(
!
data
){
return
;
}
this
.
dragonBone
.
armatureName
=
data
.
name
;
this
.
animationName
=
data
.
animation
[
0
].
name
;
}
});
}
...
...
@@ -190,7 +194,7 @@ cc.Class({
this
.
stopSpine
();
},
playSpine
()
{
this
.
dragonBone
.
playAnimation
(
'
normal
'
,
1
);
this
.
dragonBone
.
playAnimation
(
this
.
animationName
,
1
);
},
stopSpine
()
{
this
.
loadSpine
();
...
...
play/assets/tmpGame/script/Scene.js
View file @
29638ee1
...
...
@@ -202,7 +202,7 @@ cc.Class({
return
;
}
cc
.
assetManager
.
loadRemote
(
this
.
data
.
contentObj
.
bgm_url
,
null
,
(
err
,
clip
)
=>
{
this
.
bgAudioId
=
cc
.
audioEngine
.
play
(
clip
,
true
,
1
);
this
.
bgAudioId
=
cc
.
audioEngine
.
play
(
clip
,
true
,
0.5
);
});
},
stopBgm
()
{
...
...
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