Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
et_01
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
et_01
Commits
3978b37f
Commit
3978b37f
authored
Mar 08, 2021
by
智慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:解决龙骨动画一次性加载13个问题
parent
a75f6491
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
21 deletions
+28
-21
et_01.fire
play/assets/et_01/scene/et_01.fire
+14
-14
et_01.js
play/assets/et_01/script/et_01.js
+14
-7
No files found.
play/assets/et_01/scene/et_01.fire
View file @
3978b37f
...
@@ -213,7 +213,7 @@
...
@@ -213,7 +213,7 @@
"array": [
"array": [
0,
0,
0,
0,
47
7.363528253489
3,
47
5.431290009121
3,
0,
0,
0,
0,
0,
0,
...
@@ -659,7 +659,7 @@
...
@@ -659,7 +659,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 15
"__id__": 15
...
@@ -761,7 +761,7 @@
...
@@ -761,7 +761,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 17
"__id__": 17
...
@@ -863,7 +863,7 @@
...
@@ -863,7 +863,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 19
"__id__": 19
...
@@ -965,7 +965,7 @@
...
@@ -965,7 +965,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 21
"__id__": 21
...
@@ -1067,7 +1067,7 @@
...
@@ -1067,7 +1067,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 23
"__id__": 23
...
@@ -1169,7 +1169,7 @@
...
@@ -1169,7 +1169,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 25
"__id__": 25
...
@@ -1271,7 +1271,7 @@
...
@@ -1271,7 +1271,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 27
"__id__": 27
...
@@ -1373,7 +1373,7 @@
...
@@ -1373,7 +1373,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 29
"__id__": 29
...
@@ -1475,7 +1475,7 @@
...
@@ -1475,7 +1475,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 31
"__id__": 31
...
@@ -1577,7 +1577,7 @@
...
@@ -1577,7 +1577,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 33
"__id__": 33
...
@@ -1679,7 +1679,7 @@
...
@@ -1679,7 +1679,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 35
"__id__": 35
...
@@ -1781,7 +1781,7 @@
...
@@ -1781,7 +1781,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 37
"__id__": 37
...
@@ -1883,7 +1883,7 @@
...
@@ -1883,7 +1883,7 @@
"__id__": 2
"__id__": 2
},
},
"_children": [],
"_children": [],
"_active":
tru
e,
"_active":
fals
e,
"_components": [
"_components": [
{
{
"__id__": 39
"__id__": 39
...
...
play/assets/et_01/script/et_01.js
View file @
3978b37f
...
@@ -26,6 +26,7 @@ cc.Class({
...
@@ -26,6 +26,7 @@ cc.Class({
_imageResList
:
null
,
_imageResList
:
null
,
_audioResList
:
null
,
_audioResList
:
null
,
_animaResList
:
null
,
_animaResList
:
null
,
_dragonAnimaList
:
null
,
initSceneData
()
{
initSceneData
()
{
this
.
_imageResList
=
[];
this
.
_imageResList
=
[];
this
.
_audioResList
=
[];
this
.
_audioResList
=
[];
...
@@ -147,6 +148,10 @@ cc.Class({
...
@@ -147,6 +148,10 @@ cc.Class({
initData
()
{
initData
()
{
// 所有全局变量 默认都是null
// 所有全局变量 默认都是null
this
.
_cantouch
=
true
;
this
.
_cantouch
=
true
;
if
(
!
this
.
_dragonAnimaList
)
{
this
.
_dragonAnimaList
=
[
"
DailyConversations
"
,
"
WarmUp
"
,
"
LettersInLife
"
,
"
Phonics
"
,
"
LetsBlend
"
,
"
ExerciseTime
"
,
"
TraceWithMe
"
,
"
LookAndSay
"
,
"
LetsReview
"
,
"
SightWords
"
,
"
StoryTime
"
,
"
Topic
"
,
"
ReadClosely
"
];
}
},
},
initAudio
()
{
initAudio
()
{
...
@@ -175,18 +180,20 @@ cc.Class({
...
@@ -175,18 +180,20 @@ cc.Class({
},
},
initBtn
()
{
initBtn
()
{
this
.
hideDragon
();
this
.
showDragon
();
this
.
showDragon
();
// const bg = cc.find('Canvas/bg');
// bg.addComponent(cc.Button);
// //节点中添加了button组件 则可以添加click事件监听das
// bg.on('click', async () => {
// await this.showDragon();
// })
},
},
hideDragon
()
{
this
.
_dragonAnimaList
.
forEach
(
dragon
=>
{
const
nodeName
=
'
Canvas/
'
+
dragon
;
const
animationNode
=
cc
.
find
(
nodeName
);
animationNode
.
active
=
false
;
});
},
async
showDragon
()
{
async
showDragon
()
{
const
nodeName
=
'
Canvas/
'
+
this
.
data
.
animationName
;
const
nodeName
=
'
Canvas/
'
+
this
.
data
.
animationName
;
const
animationNode
=
cc
.
find
(
nodeName
);
const
animationNode
=
cc
.
find
(
nodeName
);
animationNode
.
active
=
true
;
animationNode
.
x
=
cc
.
find
(
'
Canvas
'
).
width
;
animationNode
.
x
=
cc
.
find
(
'
Canvas
'
).
width
;
animationNode
.
y
=
0
;
animationNode
.
y
=
0
;
...
...
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