Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP26
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
OP26
Commits
4ea6b276
Commit
4ea6b276
authored
Jul 11, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 加载龙骨动画的异步问题
parent
2cce1d42
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
14 deletions
+31
-14
OP26.meta
assets/OP26.meta
+15
-1
OP26.js
assets/OP26/scene/OP26.js
+13
-12
res_mgr.js
assets/OP26/script/manager/res_mgr.js
+3
-1
No files found.
assets/OP26.meta
View file @
4ea6b276
{"ver":"1.1.2","uuid":"e9510d6a-8f9e-4795-8fe5-44102de390b3","isBundle":false,"bundleName":"","priority":1,"compressionType":{},"optimizeHotUpdate":{},"inlineSpriteFrames":{},"isRemoteBundle":{"ios":false,"android":false},"subMetas":{}}
{
\ No newline at end of file
"ver": "1.1.2",
"uuid": "e9510d6a-8f9e-4795-8fe5-44102de390b3",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {
"ios": false,
"android": false
},
"subMetas": {}
}
\ No newline at end of file
assets/OP26/scene/OP26.js
View file @
4ea6b276
...
@@ -205,21 +205,22 @@ var game = cc.Class({
...
@@ -205,21 +205,22 @@ var game = cc.Class({
ske_json
:
OP26
.
data_mgr
.
data
.
ske_json
,
ske_json
:
OP26
.
data_mgr
.
data
.
ske_json
,
tex_png
:
OP26
.
data_mgr
.
data
.
tex_png
,
tex_png
:
OP26
.
data_mgr
.
data
.
tex_png
,
}
}
OP26
.
res_mgr
.
loadSpine
(
this
.
dragonLion
,
Info
);
OP26
.
res_mgr
.
loadSpine
(
this
.
dragonLion
,
Info
,
()
=>
{
//刚进入课件
//刚进入课件
//播放第一题题干
//播放第一题题干
//设置俩个人物状态
//设置俩个人物状态
this
.
playCatDragon
(
"
begin
"
);
this
.
playCatDragon
(
"
begin
"
);
this
.
playLionDragon
(
"
normal
"
);
this
.
playLionDragon
(
"
normal
"
);
// //播放题干
// //播放题干
// this.playAudioTitle();
// this.playAudioTitle();
//重置UI界面
//重置UI界面
this
.
resetUI
();
this
.
resetUI
();
//添加项
//添加项
this
.
addItem
();
this
.
addItem
();
});
},
},
//播放猫动画
//播放猫动画
...
...
assets/OP26/script/manager/res_mgr.js
View file @
4ea6b276
...
@@ -39,7 +39,7 @@ OP26.res_mgr = {
...
@@ -39,7 +39,7 @@ OP26.res_mgr = {
},
},
//加载龙骨
//加载龙骨
loadSpine
(
animationDisplay
,
Info
)
{
loadSpine
(
animationDisplay
,
Info
,
callback
)
{
cc
.
assetManager
.
loadAny
([{
url
:
Info
.
tex_json
,
ext
:
'
.txt
'
},
{
url
:
Info
.
ske_json
,
ext
:
'
.txt
'
}],
(
error
,
assets
)
=>
{
cc
.
assetManager
.
loadAny
([{
url
:
Info
.
tex_json
,
ext
:
'
.txt
'
},
{
url
:
Info
.
ske_json
,
ext
:
'
.txt
'
}],
(
error
,
assets
)
=>
{
if
(
error
)
{
if
(
error
)
{
console
.
log
(
error
)
console
.
log
(
error
)
...
@@ -69,6 +69,8 @@ OP26.res_mgr = {
...
@@ -69,6 +69,8 @@ OP26.res_mgr = {
OP26
.
data_mgr
.
dragonName
=
data
.
animation
[
0
].
name
;
OP26
.
data_mgr
.
dragonName
=
data
.
animation
[
0
].
name
;
animationDisplay
.
node
.
active
=
true
;
animationDisplay
.
node
.
active
=
true
;
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