Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_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
op_01
Commits
b0d27c7b
Commit
b0d27c7b
authored
Sep 24, 2021
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: bugs
parent
70e4b50a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
117 deletions
+14
-117
op_01.js
play/assets/op_01/scene/op_01.js
+13
-7
defaultData.js
play/assets/op_01/script/defaultData.js
+1
-110
No files found.
play/assets/op_01/scene/op_01.js
View file @
b0d27c7b
...
...
@@ -149,8 +149,10 @@ cc.Class({
this
.
loadSpriteByUrl
(
bg
,
this
.
data
.
bgItem
.
url
,
()
=>
{
bg
.
scale
=
Math
.
min
((
canvas
.
width
/
bg
.
width
),
(
canvas
.
height
/
bg
.
height
));
this
.
itemList
=
this
.
data
.
hotZoneItemArr
.
map
(
async
itemData
=>
await
this
.
createItem
(
itemData
,
bg
));
this
.
itemList
.
forEach
(
item
=>
{
this
.
itemList
=
[];
this
.
data
.
hotZoneItemArr
.
forEach
(
async
itemData
=>
{
const
item
=
await
this
.
createItem
(
itemData
,
bg
);
this
.
itemList
.
push
(
item
);
item
.
on
(
'
click
'
,
()
=>
{
item
.
clicked
=
true
;
if
(
this
.
itemList
.
every
(
tmpItem
=>
tmpItem
.
clicked
))
{
...
...
@@ -164,7 +166,7 @@ cc.Class({
.
to
(
time
,
{
angle
:
0
})
.
start
();
});
})
})
;
});
},
...
...
@@ -189,20 +191,24 @@ cc.Class({
coolCatSpeakStart
(
cb
)
{
const
cat
=
cc
.
find
(
'
Canvas/
bg/
catFrame/cat
'
);
const
cat
=
cc
.
find
(
'
Canvas/catFrame/cat
'
);
playDragonBoneAnimation
(
cat
,
'
begin
'
,
-
1
);
this
.
playAudioByUrl
(
this
.
data
.
startAudio
,
()
=>
{
playDragonBoneAnimation
(
cat
,
'
normal
'
,
-
1
);
cb
();
if
(
cb
)
{
cb
();
}
});
},
coolCatSpeakEnd
(
cb
)
{
const
cat
=
cc
.
find
(
'
Canvas/
bg/
catFrame/cat
'
);
const
cat
=
cc
.
find
(
'
Canvas/catFrame/cat
'
);
playDragonBoneAnimation
(
cat
,
'
finish
'
,
-
1
);
this
.
playAudioByUrl
(
this
.
data
.
endAudio
,
()
=>
{
playDragonBoneAnimation
(
cat
,
'
normal
'
,
-
1
);
cb
();
if
(
cb
)
{
cb
();
}
});
},
...
...
play/assets/op_01/script/defaultData.js
View file @
b0d27c7b
export
const
defaultData
=
{
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/0d332cb2b167feb4204b1d77a6f02ed6.jpg
"
,
"
rect
"
:
{
"
x
"
:
500.13
,
"
y
"
:
0
,
"
width
"
:
972.73
,
"
height
"
:
738
}
},
"
hotZoneItemArr
"
:
[{
"
id
"
:
"
1632280599616
"
,
"
index
"
:
0
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/e04216e18a88cf20bb02a144d1ff541a.jpg
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/7cba4edb49320a17b0db544780e0d0a9.mp3
"
,
"
itemType
"
:
"
pic
"
,
"
fontScale
"
:
1.54140625
,
"
imgScale
"
:
0.12967798085291557
,
"
mapScale
"
:
1.54140625
,
"
gIdx
"
:
"
0
"
,
"
rect
"
:
{
"
x
"
:
-
2.13
,
"
y
"
:
0.97
,
"
width
"
:
149
,
"
height
"
:
140.05
}
},
{
"
id
"
:
"
1632289217237
"
,
"
index
"
:
1
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/a328e3509dbf9ff14864fbfae8ce5bff.jpg
"
,
"
itemType
"
:
"
pic
"
,
"
fontScale
"
:
1.54140625
,
"
imgScale
"
:
0.6212121212121212
,
"
mapScale
"
:
1.54140625
,
"
gIdx
"
:
"
0
"
,
"
rect
"
:
{
"
x
"
:
680.71
,
"
y
"
:
2.45
,
"
width
"
:
291.35
,
"
height
"
:
249.11
}
},
{
"
id
"
:
"
1632289232403
"
,
"
index
"
:
2
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/213871779bc2404f84bfa94672dd0e74.jpg
"
,
"
itemType
"
:
"
pic
"
,
"
fontScale
"
:
1.54140625
,
"
imgScale
"
:
0.09926470588235294
,
"
mapScale
"
:
1.54140625
,
"
gIdx
"
:
"
0
"
,
"
rect
"
:
{
"
x
"
:
4.87
,
"
y
"
:
548.71
,
"
width
"
:
135
,
"
height
"
:
190.59
}
},
{
"
id
"
:
"
1632289256823
"
,
"
index
"
:
3
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/38a46bbaa1272d7b14e51f4fa882ec12.jpg
"
,
"
itemType
"
:
"
pic
"
,
"
fontScale
"
:
1.54140625
,
"
imgScale
"
:
0.1392914653784219
,
"
mapScale
"
:
1.54140625
,
"
gIdx
"
:
"
0
"
,
"
rect
"
:
{
"
x
"
:
798.88
,
"
y
"
:
477.43
,
"
width
"
:
173
,
"
height
"
:
257.13
}
},
{
"
id
"
:
"
1632289288131
"
,
"
index
"
:
4
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/98d6388099de7dcd945f39d9f74e226f.jpg
"
,
"
itemType
"
:
"
pic
"
,
"
fontScale
"
:
1.54140625
,
"
imgScale
"
:
0.24875124875124874
,
"
mapScale
"
:
1.54140625
,
"
gIdx
"
:
"
0
"
,
"
rect
"
:
{
"
x
"
:
326.87
,
"
y
"
:
215.87
,
"
width
"
:
249
,
"
height
"
:
348.25
}
},
{
"
id
"
:
"
1632298522008
"
,
"
index
"
:
5
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/c3a6342d65bd1f717615e6750b97ae30.jpg
"
,
"
itemType
"
:
"
pic
"
,
"
fontScale
"
:
1.54140625
,
"
imgScale
"
:
0.7533333333333333
,
"
mapScale
"
:
1.54140625
,
"
gIdx
"
:
"
0
"
,
"
rect
"
:
{
"
x
"
:
746.38
,
"
y
"
:
249
,
"
width
"
:
226
,
"
height
"
:
226
}
}],
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/dfb27b510e121a1045a3b7613a530e43.mp3
"
,
"
endAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/d948ef84a50e6ac36bc31110f9062878.mp3
"
}
\ No newline at end of file
export
const
defaultData
=
{
"
startAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/fa5ac4254fa286541084787985fff323.mp3
"
,
"
endAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/9f6ff5d0617bf274ee2d9af4cfc93c62.mp3
"
,
"
bgItem
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/5f386875d81fe018682062dc716a2f83.jpg
"
,
"
rect
"
:
{
"
x
"
:
281.56
,
"
y
"
:
0
,
"
width
"
:
1128.89
,
"
height
"
:
635
}
},
"
hotZoneItemArr
"
:
[{
"
id
"
:
"
1632453910417
"
,
"
index
"
:
0
,
"
pic_url
"
:
"
http://staging-teach.cdn.ireadabc.com/6b900e48a68f389dcd8c6dbd3455a270.jpg
"
,
"
audio_url
"
:
"
http://staging-teach.cdn.ireadabc.com/c08af4f22c71ad8b3d8786a837787ac9.mp3
"
,
"
itemType
"
:
"
pic
"
,
"
fontScale
"
:
1.321875
,
"
imgScale
"
:
1.136111111111111
,
"
mapScale
"
:
1.321875
,
"
gIdx
"
:
"
0
"
,
"
rect
"
:
{
"
x
"
:
419.02
,
"
y
"
:
172.08
,
"
width
"
:
290.84
,
"
height
"
:
290.84
}
}]
}
\ 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