Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aks_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
aks_01
Commits
24081168
Commit
24081168
authored
Jul 13, 2021
by
LMZ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 销毁处理
parent
30e048d9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
+9
-2
.DS_Store
.DS_Store
+0
-0
aks_01.js
play/assets/aks_01/script/aks_01.js
+7
-0
config.json
publish/publish/config.json
+1
-1
index.js
publish/publish/web_desktop/index.js
+1
-1
No files found.
.DS_Store
View file @
24081168
No preview for this file type
play/assets/aks_01/script/aks_01.js
View file @
24081168
...
...
@@ -1670,5 +1670,12 @@ cc.Class({
});
},
isDestroy
:
null
,
onDestroy
()
{
this
.
isDestroy
=
true
;
cc
.
Tween
.
stopAll
();
}
});
publish/publish/config.json
View file @
24081168
{
"ios"
:{
"sceneName"
:
"aks_01"
,
"version"
:
"84818"
},
"android"
:{
"sceneName"
:
"aks_01"
,
"version"
:
"84818"
}}
\ No newline at end of file
{
"ios"
:{
"sceneName"
:
"aks_01"
,
"version"
:
"1aac5"
},
"android"
:{
"sceneName"
:
"aks_01"
,
"version"
:
"1aac5"
}}
\ No newline at end of file
publish/publish/web_desktop/index.js
View file @
24081168
window
.
__require
=
function
t
(
e
,
a
,
n
){
function
i
(
c
,
r
){
if
(
!
a
[
c
]){
if
(
!
e
[
c
]){
var
s
=
c
.
split
(
"
/
"
);
if
(
s
=
s
[
s
.
length
-
1
],
!
e
[
s
]){
var
h
=
"
function
"
==
typeof
__require
&&
__require
;
if
(
!
r
&&
h
)
return
h
(
s
,
!
0
);
if
(
o
)
return
o
(
s
,
!
0
);
throw
new
Error
(
"
Cannot find module '
"
+
c
+
"
'
"
)}
c
=
s
}
var
d
=
a
[
c
]
=
{
exports
:{}};
e
[
c
][
0
].
call
(
d
.
exports
,
function
(
t
){
return
i
(
e
[
c
][
1
][
t
]
||
t
)},
d
,
d
.
exports
,
t
,
e
,
a
,
n
)}
return
a
[
c
].
exports
}
for
(
var
o
=
"
function
"
==
typeof
__require
&&
__require
,
c
=
0
;
c
<
n
.
length
;
c
++
)
i
(
n
[
c
]);
return
i
}({
aks_01
:[
function
(
t
,
e
){
"
use strict
"
;
cc
.
_RF
.
push
(
e
,
"
1e6c5bmzb5Cw7tGU+6pyb+T
"
,
"
aks_01
"
);
var
a
,
n
=
t
(
"
./util
"
);
cc
.
Class
(((
a
=
{
extends
:
cc
.
Component
,
properties
:{
baseWidth
:{
default
:
1280
,
type
:
cc
.
Integer
},
baseHeight
:{
default
:
720
,
type
:
cc
.
Integer
}},
onLoad
:
function
(){
cc
.
debug
.
setDisplayStats
(
!
1
),
this
.
initSceneData
(),
this
.
initSize
()},
initSceneData
:
function
(){
this
.
_imageResList
=
[],
this
.
_audioResList
=
[],
this
.
_animaResList
=
[]},
_designSize
:
null
,
_frameSize
:
null
,
_mapScaleMin
:
null
,
_mapScaleMax
:
null
,
_cocosScale
:
null
,
canvas
:
null
,
initSize
:
function
(){
var
t
=
cc
.
view
.
getFrameSize
().
width
/
cc
.
view
.
getFrameSize
().
height
>=
cc
.
Canvas
.
instance
.
designResolution
.
width
/
cc
.
Canvas
.
instance
.
designResolution
.
height
;
cc
.
Canvas
.
instance
.
fitHeight
=
t
,
cc
.
Canvas
.
instance
.
fitWidth
=!
t
;
var
e
=
cc
.
view
.
getFrameSize
();
this
.
_frameSize
=
e
,
this
.
_designSize
=
cc
.
view
.
getDesignResolutionSize
();
var
a
=
cc
.
winSize
.
width
/
e
.
width
,
n
=
cc
.
winSize
.
height
/
e
.
height
;
this
.
_cocosScale
=
Math
.
min
(
a
,
n
),
a
=
e
.
width
/
this
.
_designSize
.
width
,
n
=
e
.
height
/
this
.
_designSize
.
height
,
this
.
_mapScaleMin
=
Math
.
min
(
a
,
n
)
*
this
.
_cocosScale
,
this
.
_mapScaleMax
=
Math
.
max
(
a
,
n
)
*
this
.
_cocosScale
,
this
.
canvas
=
cc
.
find
(
"
Canvas
"
)},
isTeacher
:
null
,
serverAllUser
:
null
,
start
:
function
(){
var
t
=
this
,
e
=
this
.
getData
.
bind
(
this
);
window
&&
window
.
courseware
&&
(
e
=
window
.
courseware
.
getData
),
e
(
function
(
e
,
a
){
var
n
,
i
,
o
;
"
tea
"
==
(
null
==
(
n
=
window
.
air
)?
void
0
:
null
==
(
i
=
n
.
airClassInfo
)?
void
0
:
null
==
(
o
=
i
.
user
)?
void
0
:
o
.
classRole
)
&&
(
t
.
isTeacher
=!
0
),
a
&&
(
console
.
log
(
"
aspect :
"
,
a
),
t
.
serverAllUser
=
a
.
all_user
,
t
.
initPageData
(
a
)),
console
.
log
(
"
data:
"
,
e
),
t
.
data
=
e
||
t
.
getDefaultData
(),
t
.
preloadItem
()})},
_imageResList
:
null
,
_audioResList
:
null
,
_animaResList
:
null
,
preloadItem
:
function
(){
this
.
preload
()},
getData
:
function
(
t
){
t
(
this
.
getDefaultData
())},
getDefaultData
:
function
(){
return
JSON
.
parse
(
'
{"customAction":{"type":"text","changeStart":[["color","#ff00ff"],["size","30px"]],"changeEnd":[["color","#ffffff"],["size","33px"]],"changeTime":"0.5","pic_url":"http://staging-teach.cdn.ireadabc.com/071c713ba8b0bc9c6399a42ac8811082.png","text":"aaaa"},"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/c2cb9a9f65af3b853e57a22a6602e481.png","rect":{"x":209.51,"y":0,"width":851.97,"height":479}},"hotZoneItemArr":[{"id":"1614839864479","index":0,"audio_url":"http://staging-teach.cdn.ireadabc.com/32258b839eca32b6ccf94f3dd6c86e0c.mp3","itemType":"rect","fontScale":0.99296875,"imgScale":1,"mapScale":0.99296875,"gIdx":"2","rect":{"x":554.19,"y":138.28,"width":76.37,"height":72.85}},{"id":"1614840901996","index":1,"pic_url":"http://staging-teach.cdn.ireadabc.com/c8abf7383d65bcbdba8f390785cece60.png","itemType":"pic","fontScale":0.99296875,"imgScale":0.4963768115942029,"mapScale":0.99296875,"gIdx":"1","rect":{"x":699.35,"y":162.22,"width":137,"height":137}},{"id":"1614840912007","index":2,"audio_url":"http://staging-teach.cdn.ireadabc.com/85cff126986f5cc11b05e95181da5869.mp3","itemType":"text","fontScale":0.99296875,"imgScale":1,"mapScale":0.99296875,"gIdx":"3","actionData_3":{"type":"text","changeStart":[],"changeEnd":[],"changeTime":0.3,"changeOption":[["fontColor","#00ffff","#00ffff"],["fontSize","100","100"],["opacity","0","100"]],"text":"dddddg","audio_url":"http://staging-teach.cdn.ireadabc.com/5285e1e88a26a08783757e9c43a8653f.mp3"},"rect":{"width":371.17,"height":99.3,"x":306.63,"y":8.14}},{"id":"1614842879059","index":3,"audio_url":"http://staging-teach.cdn.ireadabc.com/cd8daa8b4d8ff707b3a3680e80bc4761.mp3","itemType":"rect","fontScale":0.99296875,"imgScale":1,"mapScale":0.99296875,"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/c5c80dbe4df2fe619f67b4d8a99d15c8.json","name":"a_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/df141aa05ea55b3835ef2ebfc6685d48.json","name":"a_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/adbfe4292df235154c88737fe22cdba0.png","name":"a_tex.png"},"gIdx":"0","rect":{"x":111.27,"y":277.23,"width":76.31,"height":76.31}},{"id":"1614932660076","index":4,"itemType":"pic","fontScale":0.99296875,"imgScale":1.134480587666508,"mapScale":0.99296875,"gIdx":"4","actionData_4":{"type":"pic","skeJsonData":{},"texJsonData":{},"texPngData":{},"changeStart":[],"changeEnd":[],"changeTime":0.3,"changeOption":[["scale","1"],["opacity","50","100"]],"pic_url":"http://staging-teach.cdn.ireadabc.com/97eb28e4c023f92efde4310d590be985.png","audio_url":"http://staging-teach.cdn.ireadabc.com/c693181b18d5b8e018cdd0dbbd8a8466.mp3"},"rect":{"x":715.92,"y":310,"width":110.04,"height":144.08}},{"id":"1616741577774","index":5,"itemType":"rect","fontScale":0.99296875,"imgScale":1,"mapScale":0.99296875,"gIdx":"5","actionData_5":{"type":"anima","skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/c5c80dbe4df2fe619f67b4d8a99d15c8.json","name":"a_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/df141aa05ea55b3835ef2ebfc6685d48.json","name":"a_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/adbfe4292df235154c88737fe22cdba0.png","name":"a_tex.png"},"changeStart":[],"changeEnd":[],"changeTime":0.3,"changeOption":[["scale","1"],["opacity","0","100"]],"audio_url":"http://staging-teach.cdn.ireadabc.com/c693181b18d5b8e018cdd0dbbd8a8466.mp3"},"rect":{"x":11.48,"y":7,"width":147.01,"height":147.01}}],"title":"Look and Say","title_audio_url":"http://staging-teach.cdn.ireadabc.com/85cff126986f5cc11b05e95181da5869.mp3"}
'
)},
preload
:
function
(){
var
t
=
this
,
e
=
this
.
_imageResList
.
concat
(
this
.
_audioResList
).
concat
(
this
.
_animaResList
);
cc
.
assetManager
.
loadAny
(
e
,
null
,
null
,
function
(){
t
.
addServerListener
(),
window
&&
window
.
air
&&
window
.
air
.
hideAirClassLoading
()})},
addPreloadImage
:
function
(){
var
t
=
this
;
this
.
data
.
bgItem
&&
this
.
_imageResList
.
push
({
url
:
this
.
data
.
bgItem
.
url
}),
this
.
data
.
hotZoneItemArr
&&
this
.
data
.
hotZoneItemArr
.
forEach
(
function
(
e
){
e
.
pic_url
&&
t
.
_imageResList
.
push
({
url
:
e
.
pic_url
})})},
addPreloadAudio
:
function
(){
var
t
=
this
;
this
.
_audioResList
.
push
({
url
:
this
.
data
.
title_audio_url
||
""
}),
this
.
data
.
hotZoneItemArr
&&
this
.
data
.
hotZoneItemArr
.
forEach
(
function
(
e
){
t
.
_audioResList
.
push
({
url
:
e
.
audio_url
})})},
addPreloadAnima
:
function
(){
var
t
=
this
;
this
.
data
.
hotZoneItemArr
&&
this
.
data
.
hotZoneItemArr
.
forEach
(
function
(
e
){
e
.
skeJsonData
&&
(
t
.
_animaResList
.
push
({
url
:
e
.
skeJsonData
.
url
||
""
}),
t
.
_animaResList
.
push
({
url
:
e
.
texJsonData
.
url
||
""
}),
t
.
_animaResList
.
push
({
url
:
e
.
texPngData
.
url
||
""
}))})},
loadEnd
:
function
(){
this
.
initData
(),
this
.
initView
()},
initMusic
:
function
(){
cc
.
assetManager
.
loadRemote
(
this
.
data
.
bg_audio_url
,
function
(
t
,
e
){
cc
.
audioEngine
.
setMusicVolume
(.
3
),
cc
.
audioEngine
.
playMusic
(
e
,
!
0
)})},
pageData
:
null
,
initPageData
:
function
(
t
){
var
e
,
a
=
null
==
t
?
void
0
:
null
==
(
e
=
t
.
page_aspect
)?
void
0
:
e
.
pagedata
;
this
.
pageData
=
a
?
JSON
.
parse
(
a
):{},
console
.
log
(
"
this.pageData:
"
,
this
.
pageData
)},
setPageData
:
function
(
t
,
e
){
this
.
pageData
&&
(
this
.
pageData
[
t
]
=
e
,
this
.
sendPageData
())},
getPageData
:
function
(
t
){
if
(
this
.
pageData
&&
this
.
pageData
[
t
])
return
this
.
pageData
[
t
]},
sendPageData
:
function
(){
var
t
=
this
.
pageData
;
if
(
window
&&
window
.
courseware
){
var
e
=
window
.
courseware
.
storePageAspect
;
e
&&
(
e
(
t
),
console
.
log
(
"
storePageAspect :
"
,
t
))}},
smogArr
:
null
,
initData
:
function
(){
this
.
smogArr
=
[],
this
.
initAudioEffect
()},
tip1Clip
:
null
,
tip2Clip
:
null
,
tip3Clip
:
null
,
magicAppearClip
:
null
,
bgClip
:
null
,
btnClip
:
null
,
walkClip
:
null
,
initAudioEffect
:
function
(){
this
.
tip1Clip
=
cc
.
find
(
"
Canvas/res/audio/tip_1
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
tip2Clip
=
cc
.
find
(
"
Canvas/res/audio/tip_2
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
tip3Clip
=
cc
.
find
(
"
Canvas/res/audio/tip_3
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
magicAppearClip
=
cc
.
find
(
"
Canvas/res/audio/magic_appear
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
bgClip
=
cc
.
find
(
"
Canvas/res/audio/bg
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
btnClip
=
cc
.
find
(
"
Canvas/res/audio/btn
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
walkClip
=
cc
.
find
(
"
Canvas/res/audio/walk
"
).
getComponent
(
cc
.
AudioSource
).
clip
},
playBgMusic
:
function
(){
var
t
=
this
;(
0
,
n
.
playAudio
)(
this
.
bgClip
,
function
(){
t
.
playBgMusic
()})},
sendServerEvent
:
function
(
t
,
e
){
var
a
=
window
.
courseware
;
a
&&
a
.
sendEvent
(
t
,
e
)},
addServerListener
:
function
(){
var
t
=
this
;
console
.
log
(
"
in addServerListener
"
),
window
.
air
&&
(
window
.
air
.
onCourseInScreen
=
function
(
e
){
t
.
showTemplateStartAnima
(),
t
.
loadEnd
(),
e
()});
var
e
=
window
.
courseware
;
e
&&
(
this
.
isTeacher
&&
e
.
onEvent
(
"
check_enter_next_template
"
,
function
(
e
,
a
){
t
.
checkEnterNextTemplate
(
e
),
a
()}),
e
.
onEvent
(
"
btn_click
"
,
function
(
e
,
a
){
t
.
btnClick
(),
a
()}))},
checkEnterNextTemplate
:
function
(){},
showTemplateStartAnima
:
function
(){
var
t
=
cc
.
find
(
"
Canvas/res/anima/pageturn
"
),
e
=
cc
.
instantiate
(
t
);
e
.
scale
=
this
.
_mapScaleMax
,
cc
.
find
(
"
Canvas
"
).
addChild
(
e
,
100
);
var
a
=
e
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
a
.
on
(
dragonBones
.
EventObject
.
COMPLETE
,
function
(){
e
.
removeFromParent
()}),
a
.
playAnimation
(
"
pageturn2
"
,
1
)},
showTemplateEndAnima
:
function
(){
var
t
=
this
,
e
=
cc
.
find
(
"
Canvas/res/anima/pageturn
"
),
a
=
cc
.
instantiate
(
e
);
cc
.
find
(
"
Canvas
"
).
addChild
(
a
,
100
);
var
n
=
a
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
n
.
on
(
dragonBones
.
EventObject
.
COMPLETE
,
function
(){
cc
.
tween
({}).
delay
(
1
).
call
(
function
(){
window
&&
window
.
courseware
&&
t
.
isTeacher
&&
window
.
courseware
.
nextPage
()}).
start
()}),
n
.
playAnimation
(
"
pageturn
"
,
1
)},
initView
:
function
(){
this
.
initTree
(),
this
.
playBgMusic
(),
"
1
"
==
this
.
data
.
isEndStyle
?
this
.
showEndStyle
():(
this
.
initTitle
(),
this
.
initSmog
(),
this
.
showSound
())},
showEndStyle
:
function
(){
this
.
hideEdge
(),
this
.
addMagicBg
(),
this
.
enlargeMap
(),
this
.
addRole
()},
hideEdge
:
function
(){
cc
.
find
(
"
Canvas/bg_leftbottom
"
).
active
=!
1
,
cc
.
find
(
"
Canvas/bg_rightbottom
"
).
active
=!
1
,
cc
.
find
(
"
Canvas/bg_righttop
"
).
active
=!
1
,
cc
.
find
(
"
Canvas/bg_lefttop
"
).
active
=!
1
},
addRole
:
function
(){
var
t
=
this
;
console
.
log
(
"
in showMagic
"
);
var
e
=
cc
.
find
(
"
Canvas/res/anima/role
"
),
a
=
cc
.
instantiate
(
e
);
a
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
walk
"
,
-
1
),
a
.
parent
=
cc
.
find
(
"
Canvas/bg_door
"
),
a
.
x
=-
this
.
canvas
.
width
/
2
,
a
.
y
=-
30
,
cc
.
tween
(
a
).
to
(
4
,{
x
:
0
}).
start
(),
cc
.
tween
(
a
).
delay
(
3
).
to
(
1
,{
opacity
:
0
},{
easing
:
"
cubicIn
"
}).
call
(
function
(){
cc
.
audioEngine
.
stop
(
i
),
t
.
showTemplateEndAnima
()}).
start
();
var
i
=
(
0
,
n
.
playAudio
)(
this
.
walkClip
,
function
(){})},
enlargeMap
:
function
(){
this
.
canvas
.
scale
*=
1.2
},
addMagicBg
:
function
(){
var
t
=
cc
.
find
(
"
Canvas/res/anima/magic
"
),
e
=
cc
.
instantiate
(
t
);
e
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
spinturn
"
,
-
1
),
e
.
parent
=
cc
.
find
(
"
Canvas/bg_door
"
)},
showSound
:
function
(){
var
t
=
this
;
this
.
showPanel1
(),(
0
,
n
.
playAudio
)(
this
.
tip1Clip
,
function
(){
t
.
tip1ShowEnd
()})},
tip1ShowEnd
:
function
(){
var
t
=
this
;
this
.
showMagic
(),(
0
,
n
.
playAudio
)(
this
.
tip2Clip
,
function
(){
t
.
tip2ShowEnd
()})},
tip2ShowEnd
:
function
(){
this
.
showBtn
(),
this
.
showPanel2
()},
panel1
:
null
,
showPanel1
:
function
(){
if
(
this
.
isTeacher
){
var
t
=
(
0
,
n
.
getSprNode
)(
"
bg_ti1
"
);
t
.
scale
=
this
.
_mapScaleMin
,
t
.
parent
=
cc
.
find
(
"
Canvas
"
),
t
.
zIndex
=
20
,
t
.
anchorY
=
0
,
t
.
y
=-
this
.
canvas
.
height
/
2
,
this
.
panel1
=
t
,
t
.
baseY
=
t
.
y
,
t
.
y
-=
t
.
height
/
2
*
t
.
scaleY
,
cc
.
tween
(
t
).
to
(
1
,{
y
:
t
.
baseY
},{
easing
:
"
cubicOut
"
}).
start
()}},
panel2
:
null
,
showPanel2
:
function
(){
if
(
this
.
isTeacher
){
var
t
=
(
0
,
n
.
getSprNode
)(
"
bg_ti2
"
);
t
.
scale
=
this
.
_mapScaleMin
,
t
.
parent
=
cc
.
find
(
"
Canvas
"
),
t
.
zIndex
=
30
,
t
.
anchorY
=
0
,
t
.
y
=-
this
.
canvas
.
height
/
2
,
t
.
opacity
=
0
,
this
.
panel2
=
t
,
cc
.
tween
(
this
.
panel1
).
delay
(.
3
).
to
(.
3
,{
opacity
:
0
}).
start
(),
cc
.
tween
(
t
).
to
(.
3
,{
opacity
:
255
}).
start
()}},
showMagic
:
function
(){
console
.
log
(
"
in showMagic
"
);
var
t
=
cc
.
find
(
"
Canvas/res/anima/magic
"
),
e
=
cc
.
instantiate
(
t
),
a
=
e
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
a
.
on
(
dragonBones
.
EventObject
.
COMPLETE
,
function
(){
a
.
playAnimation
(
"
spinturn
"
,
-
1
)}),
a
.
playAnimation
(
"
appear
"
,
1
),
e
.
parent
=
cc
.
find
(
"
Canvas/bg_door
"
),(
0
,
n
.
playAudio
)(
this
.
magicAppearClip
)},
btn
:
null
,
showBtn
:
function
(){
var
t
=
this
;
console
.
log
(
"
in showBtn
"
);
var
e
=
(
0
,
n
.
getSprNode
)(
"
btn_go
"
);
e
.
parent
=
this
.
canvas
,
e
.
zIndex
=
50
,
e
.
scale
=
this
.
_mapScaleMin
,
e
.
x
=
230
*
this
.
_mapScaleMin
,
e
.
y
=-
this
.
canvas
.
height
/
2
+
230
*
this
.
_mapScaleMin
,
e
.
addComponent
(
cc
.
Button
),
e
.
on
(
"
click
"
,
function
(){
t
.
sendServerEvent
(
"
btn_click
"
)}),
e
.
opacity
=
0
,
this
.
btn
=
e
,
cc
.
tween
(
e
).
to
(.
5
,{
opacity
:
255
}).
start
(),
this
.
showHand
()},
btnClick
:
function
(){
var
t
=
this
;
this
.
btn
&&
0
!=
this
.
btn
.
opacity
&&
(
this
.
btn
.
opacity
=
0
,(
0
,
n
.
playAudio
)(
this
.
btnClip
),(
0
,
n
.
playAudio
)(
this
.
tip3Clip
,
function
(){
t
.
showTemplateEndAnima
()}))},
showHand
:
function
(){
console
.
log
(
"
in showHand
"
);
var
t
=
(
0
,
n
.
getSprNode
)(
"
icon_hand1
"
);
t
.
parent
=
this
.
btn
,
t
.
x
=
100
,
t
.
y
=-
60
;
var
e
=
(
0
,
n
.
getSprNode
)(
"
icon_hand2
"
);
e
.
parent
=
this
.
btn
,
e
.
x
=
t
.
x
,
e
.
y
=
t
.
y
,
e
.
opacity
=
0
,
this
.
btn
.
hand1
=
t
,
this
.
btn
.
hand2
=
e
,
this
.
showHandAnima
()},
showHandAnima
:
function
(){
var
t
=
this
,
e
=
this
.
btn
.
hand1
,
a
=
this
.
btn
.
hand2
;
0
==
e
.
opacity
?
cc
.
tween
(
this
.
btn
).
delay
(.
2
).
call
(
function
(){
e
.
opacity
=
255
,
a
.
opacity
=
0
,
t
.
showHandAnima
()}).
start
():
cc
.
tween
(
this
.
btn
).
delay
(.
5
).
call
(
function
(){
e
.
opacity
=
0
,
a
.
opacity
=
255
,
t
.
showHandAnima
()}).
start
()},
initSmog
:
function
(){
this
.
addSmog
(
-
this
.
canvas
.
width
/
1.5
,
!
1
),
this
.
addSmog
(
-
this
.
canvas
.
width
/
2
,
!
1
),
this
.
addSmog
(
-
this
.
canvas
.
width
/
2
+
this
.
canvas
.
width
/
3
,
!
1
),
this
.
addSmog
(
-
this
.
canvas
.
width
/
2
+
this
.
canvas
.
width
/
3
*
2
)},
addSmog
:
function
(
t
,
e
){
var
a
=
this
;
void
0
===
e
&&
(
e
=!
0
);
var
i
,
o
=
cc
.
find
(
"
Canvas/bg_door
"
);
this
.
smogArr
.
length
>
0
?
i
=
this
.
smogArr
.
pop
():(
i
=
(
0
,
n
.
getSprNode
)(
"
bg_smog
"
),
o
.
addChild
(
i
)),
i
.
scale
=
this
.
_mapScaleMin
*
(.
5
+
.
7
*
Math
.
random
()),
i
.
x
=
t
,
i
.
y
=
80
*
Math
.
random
()
-
140
,
i
.
zIndex
=
10
,
Math
.
random
()
>
.
5
&&
(
i
.
scaleX
*=-
1
);
var
c
=
30
+
10
*
Math
.
random
();
cc
.
tween
(
i
).
to
(
c
,{
x
:
this
.
canvas
.
width
}).
call
(
function
(){
a
.
smogArr
.
push
(
i
)}).
start
(),
e
&&
(
0
,
n
.
delayCall
)(
c
/
10
+
c
/
10
*
Math
.
random
(),
function
(){
a
.
addSmog
(
-
a
.
canvas
.
width
)})},
initTree
:
function
(){
this
.
initAppleTree
(),
this
.
initBananaTree
(),
this
.
initOrangeTree
()},
initAppleTree
:
function
(){
for
(
var
t
=
cc
.
find
(
"
Canvas/bg_grass
"
),
e
=-
t
.
width
/
2
,
a
=-
t
.
height
/
2
,
i
=
[[
e
+
133
,
a
+
357
,.
76
],[
e
+
253
,
a
+
269
,
1
],[
e
+
860
,
a
+
355
,.
84
],[
e
+
1045
,
a
+
379
,.
64
],[
e
+
1240
,
a
+
314
,
1
]],
o
=
this
.
canvas
.
width
/
1280
,
c
=
0
;
c
<
i
.
length
;
c
++
){
var
r
=
i
[
c
],
s
=
(
r
[
0
]
+
t
.
width
/
2
)
*
o
,
h
=
(
0
,
n
.
getSprNode
)(
"
bg_apple
"
);
h
.
x
=
e
+
s
,
h
.
y
=
r
[
1
],
h
.
scale
=
r
[
2
],
h
.
anchorY
=
0
,
t
.
addChild
(
h
,
this
.
canvas
.
height
-
h
.
y
),
this
.
addTreeAnima
(
h
)}},
initBananaTree
:
function
(){
for
(
var
t
=
cc
.
find
(
"
Canvas/bg_grass
"
),
e
=-
t
.
width
/
2
,
a
=-
t
.
height
/
2
,
i
=
[[
e
+
14
,
a
+
364
,.
7
],[
e
+
49
,
a
+
294
,.
94
],[
e
+
298
,
a
+
393
,.
7
],[
e
+
1129
,
a
+
261
,
1
],[
e
+
1265
,
a
+
419
,.
7
]],
o
=
this
.
canvas
.
width
/
1280
,
c
=
0
;
c
<
i
.
length
;
c
++
){
var
r
=
i
[
c
],
s
=
(
r
[
0
]
+
t
.
width
/
2
)
*
o
,
h
=
(
0
,
n
.
getSprNode
)(
"
bg_banana
"
);
h
.
x
=
e
+
s
,
h
.
y
=
r
[
1
],
h
.
scale
=
r
[
2
],
h
.
anchorY
=
0
,
t
.
addChild
(
h
,
this
.
canvas
.
height
-
h
.
y
),
this
.
addTreeAnima
(
h
)}},
initOrangeTree
:
function
(){
for
(
var
t
=
cc
.
find
(
"
Canvas/bg_grass
"
),
e
=-
t
.
width
/
2
,
a
=-
t
.
height
/
2
,
i
=
[[
e
+
239
,
a
+
402
,.
82
],[
e
+
916
,
a
+
385
,.
82
],[
e
+
978
,
a
+
293
,
1
],[
e
+
1086
,
a
+
417
,.
72
]],
o
=
this
.
canvas
.
width
/
1280
,
c
=
0
;
c
<
i
.
length
;
c
++
){
var
r
=
i
[
c
],
s
=
(
r
[
0
]
+
t
.
width
/
2
)
*
o
,
h
=
(
0
,
n
.
getSprNode
)(
"
bg_orange
"
);
h
.
x
=
e
+
s
,
h
.
y
=
r
[
1
],
h
.
scale
=
r
[
2
],
h
.
anchorY
=
0
,
t
.
addChild
(
h
,
this
.
canvas
.
height
-
h
.
y
),
this
.
addTreeAnima
(
h
)}},
addTreeAnima
:
function
(
t
){
var
e
=
this
,
a
=
1
+
1
*
Math
.
random
(),
i
=
8
*
a
,
o
=
4
*
a
;
cc
.
tween
(
t
).
to
(
o
/
3
/
2
,{
skewX
:.
3
*
i
},{
easing
:
"
sineInOut
"
}).
to
(
o
/
3
/
1.2
,{
skewX
:
-
.
1
*
i
},{
easing
:
"
sineInOut
"
}).
to
(
o
/
3
,{
skewX
:.
05
*
i
},{
easing
:
"
sineInOut
"
}).
to
(
o
/
3
,{
skewX
:
0
*
i
},{
easing
:
"
sineInOut
"
}).
start
(),(
0
,
n
.
delayCall
)(
o
+
1.5
*
Math
.
random
(),
function
(){
e
.
addTreeAnima
(
t
)})},
initTitle
:
function
(){
var
t
=
20
*
this
.
_mapScaleMin
,
e
=
20
*
this
.
_mapScaleMin
,
a
=
(
0
,
n
.
getSprNode
)(
"
bg_title
"
);
a
.
parent
=
this
.
canvas
,
a
.
scale
=
this
.
_mapScaleMin
,
a
.
zIndex
=
20
,
a
.
x
=-
this
.
canvas
.
width
/
2
+
a
.
width
/
2
*
a
.
scale
+
t
,
a
.
y
=
this
.
canvas
.
height
/
2
-
a
.
height
/
2
*
a
.
scale
-
e
;
var
i
=
cc
.
find
(
"
Canvas/bg_leftbottom
"
),
o
=
cc
.
find
(
"
Canvas/bg_lefttop
"
),
c
=
cc
.
find
(
"
Canvas/bg_rightbottom
"
),
r
=
cc
.
find
(
"
Canvas/bg_righttop
"
);
i
.
scale
=
o
.
scale
=
c
.
scale
=
r
.
scale
=
this
.
_mapScaleMin
}}).
_cocosScale
=
null
,
a
.
initBg
=
function
(){
var
t
=
cc
.
view
.
getFrameSize
(),
e
=
cc
.
winSize
.
width
/
t
.
width
,
a
=
cc
.
winSize
.
height
/
t
.
height
,
n
=
Math
.
min
(
e
,
a
);
this
.
_cocosScale
=
n
;
var
i
=
cc
.
find
(
"
Canvas/bg
"
);
e
=
t
.
width
/
i
.
width
,
a
=
t
.
height
/
i
.
height
,
i
.
scale
=
Math
.
max
(
e
,
a
)
*
n
,
i
.
anchorX
=
1
,
i
.
anchorY
=
0
,
i
.
x
=
t
.
width
/
2
*
n
,
i
.
y
=-
t
.
height
/
2
*
n
;
var
o
=
cc
.
find
(
"
Canvas/bg
"
),
c
=
new
cc
.
Node
;
c
.
x
=-
o
.
x
,
c
.
y
=-
o
.
y
,
c
.
scaleX
=
o
.
scaleX
,
c
.
scaleY
=
o
.
scaleY
,
o
.
addChild
(
c
);
var
r
=
c
.
addComponent
(
cc
.
Graphics
);
r
.
fillColor
=
this
.
data
.
bgColor
||
"
#f9bd03
"
,
r
.
fillRect
(
-
o
.
width
/
2
,
-
o
.
height
/
2
,
o
.
width
,
o
.
height
),
r
.
fill
()},
a
.
initHotZone
=
function
(){
this
.
initHotZoneBg
()},
a
.
hotZoneBg
=
null
,
a
.
initHotZoneBg
=
function
(){
var
t
=
this
;
this
.
hotZoneBg
=
new
cc
.
Node
,
this
.
hotZoneBg
.
name
=
"
hotZoneBg
"
,
this
.
hotZoneBg
.
parent
=
cc
.
find
(
"
Canvas
"
);
var
e
=
107
*
this
.
_mapScaleMin
+
22
;
this
.
data
.
bgItem
&&
cc
.
loader
.
load
({
url
:
this
.
data
.
bgItem
.
url
},
function
(
a
,
n
){
t
.
hotZoneBg
.
width
=
n
.
width
,
t
.
hotZoneBg
.
height
=
n
.
height
;
var
i
=
new
cc
.
Node
;
i
.
name
=
"
bgItemSpr
"
;
var
o
=
new
cc
.
SpriteFrame
(
n
);
i
.
addComponent
(
cc
.
Sprite
).
spriteFrame
=
o
,
i
.
width
=
t
.
hotZoneBg
.
width
,
i
.
height
=
t
.
hotZoneBg
.
height
,
i
.
parent
=
t
.
hotZoneBg
,
window
.
bg
=
i
;
var
c
=
t
.
canvas
.
width
/
t
.
hotZoneBg
.
width
,
r
=
(
t
.
canvas
.
height
-
e
)
/
t
.
hotZoneBg
.
height
,
s
=
Math
.
min
(
c
,
r
);
t
.
hotZoneBg
.
scale
=
s
,
t
.
hotZoneBg
.
y
=
0
-
e
/
2
,
t
.
initHotZoneItem
()})},
a
.
initHotZoneItem
=
function
(){
var
t
=
this
;
this
.
data
.
hotZoneItemArr
.
forEach
(
function
(
e
){
switch
(
e
.
gIdx
){
case
"
0
"
:
t
.
setOneAnimaSmall
(
e
);
break
;
case
"
1
"
:
t
.
setOnePic
(
e
);
break
;
case
"
2
"
:
t
.
setOneRect
(
e
);
break
;
case
"
3
"
:
case
"
4
"
:
case
"
5
"
:
t
.
setOneAction
(
e
)}})},
a
.
addMask
=
function
(
t
){
t
.
addComponent
(
cc
.
Mask
).
type
=
cc
.
Mask
.
Type
.
RECT
},
a
.
setOneAction
=
function
(
t
){
var
e
=
this
.
hotZoneBg
.
scale
*
this
.
hotZoneBg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
,
a
=
new
cc
.
Node
;
a
.
name
=
"
rect
"
+
t
.
index
,
this
.
hotZoneBg
.
addChild
(
a
);
var
n
=
a
.
addComponent
(
cc
.
Graphics
);
n
.
lineWidth
=
4
,
n
.
strokeColor
=
cc
.
Color
.
BLACK
,
n
.
fillColor
=
cc
.
Color
.
WHITE
.
setA
(
100
);
var
i
=
e
/
this
.
hotZoneBg
.
scaleY
;
a
.
width
=
t
.
rect
.
width
*
i
,
a
.
height
=
t
.
rect
.
height
*
i
,
a
.
x
=-
this
.
hotZoneBg
.
width
/
2
+
t
.
rect
.
x
*
i
,
a
.
y
=
this
.
hotZoneBg
.
height
/
2
-
t
.
rect
.
height
*
i
-
t
.
rect
.
y
*
i
,
a
.
x
,
a
.
y
,
a
.
width
,
a
.
height
,
a
.
anchorX
=
a
.
anchorY
=
0
,
this
.
data
.
bgItem
.
isShowDebugLine
&&
n
.
rect
(
0
,
0
,
a
.
width
,
a
.
height
),
n
.
stroke
(),
n
.
fill
(),
console
.
log
(
"
setOneAction ~~ data:
"
,
t
);
var
o
=
t
[
"
actionData_
"
+
t
.
gIdx
];
if
(
o
)
if
(
"
text
"
==
o
.
type
){
var
c
=
this
.
setOneActionText
(
a
,
o
);
c
.
node
.
scale
=
i
*
t
.
fontScale
,
c
.
_forceUpdateRenderData
(
!
0
)}
else
"
pic
"
==
o
.
type
?
this
.
setOneActionPic
(
a
,
o
):
"
anima
"
==
o
.
type
&&
this
.
setOneActionAnima
(
a
,
o
)},
a
.
setOneActionText
=
function
(
t
,
e
){
var
a
=
new
cc
.
Node
;
a
.
parent
=
t
;
var
n
=
a
.
addComponent
(
cc
.
Label
);
n
.
font
=
cc
.
find
(
"
Canvas/res/font/aharoni
"
).
getComponent
(
cc
.
Label
).
font
,
n
.
string
=
e
.
text
,
a
.
color
=
cc
.
Color
.
BLACK
;
for
(
var
i
=
e
.
changeOption
,
o
=
[],
c
=
0
;
c
<
i
.
length
;
c
++
){
var
r
=
i
[
c
];
if
(
console
.
log
(
"
opArr[0]
"
,
i
[
c
]),
"
fontColor
"
==
r
[
0
]){
var
s
=
new
cc
.
Color
;
cc
.
Color
.
fromHEX
(
s
,
r
[
1
]),
a
.
color
=
s
}
else
"
opacity
"
==
r
[
0
]?(
a
.
opacity
=
Number
(
r
[
1
]
/
100
*
255
)
+
.
1
,
o
.
push
({
item
:
a
,
option
:
'
{"
'
+
r
[
0
]
+
'
" :
'
+
r
[
2
]
/
100
*
255
+
"
}
"
,
optionName
:
r
[
0
]})):(
n
[
r
[
0
]]
=
r
[
1
],
o
.
push
({
item
:
n
,
option
:
'
{"
'
+
r
[
0
]
+
'
" :
'
+
r
[
2
]
+
"
}
"
,
optionName
:
r
[
0
]}))}
return
e
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
t
,
e
){
a
.
audioClip
=
e
}),
n
.
lineHeight
=
n
.
fontSize
,
a
.
y
+=
t
.
height
/
2
,
a
.
x
+=
t
.
width
/
2
,
t
.
addComponent
(
cc
.
Button
),
t
.
on
(
"
click
"
,
function
(){
a
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
a
.
audioClip
,
!
1
,.
8
)),
a
.
isClicked
,
a
.
isClicked
=!
0
;
for
(
var
t
=
0
;
t
<
o
.
length
;
t
++
){
var
n
=
o
[
t
];
"
opacity
"
==
n
.
optionName
&&
(
console
.
log
(
"
~~~
"
,
n
.
item
[
n
.
optionName
]),
cc
.
tween
(
n
.
item
).
to
(
e
.
changeTime
,
JSON
.
parse
(
n
.
option
)).
start
())}}),
n
},
a
.
setOneActionPic
=
function
(
t
,
e
){
console
.
log
(
"
setOneActionPic actionData:
"
,
e
);
var
a
=
new
cc
.
Node
;
t
.
addChild
(
a
),
cc
.
loader
.
load
({
url
:
e
.
pic_url
},
function
(
n
,
i
){
a
.
addComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
i
),
a
.
y
+=
t
.
height
/
2
,
a
.
x
+=
t
.
width
/
2
,
a
.
scaleX
=
t
.
width
/
a
.
width
,
a
.
scaleY
=
t
.
height
/
a
.
height
;
for
(
var
o
=
e
.
changeOption
,
c
=
[],
r
=
0
;
r
<
o
.
length
;
r
++
){
var
s
=
o
[
r
];
console
.
log
(
"
opData: ~~~
"
,
s
),
"
opacity
"
==
s
[
0
]
&&
(
a
.
opacity
=
Number
(
s
[
1
]
/
100
*
255
)
+
.
1
,
console
.
log
(
a
.
opacity
),
c
.
push
({
item
:
a
,
option
:
'
{"
'
+
s
[
0
]
+
'
" :
'
+
s
[
2
]
/
100
*
255
+
"
}
"
,
optionName
:
s
[
0
]})),
e
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
e
,
a
){
t
.
audioClip
=
a
}),
t
.
addComponent
(
cc
.
Button
),
t
.
on
(
"
click
"
,
function
(){
t
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
t
.
audioClip
,
!
1
,.
8
)),
t
.
isClicked
,
t
.
isClicked
=!
0
;
for
(
var
a
=
0
;
a
<
c
.
length
;
a
++
){
var
n
=
c
[
a
];
"
opacity
"
==
n
.
optionName
&&
cc
.
tween
(
n
.
item
).
to
(
e
.
changeTime
,
JSON
.
parse
(
n
.
option
)).
start
()}})}})},
a
.
setOneActionAnima
=
function
(
t
,
e
){
var
a
=
new
cc
.
Node
;
t
.
addChild
(
a
),
e
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
e
,
a
){
t
.
audioClip
=
a
});
var
n
=
e
,
i
=
a
.
addComponent
(
dragonBones
.
ArmatureDisplay
);
if
(
n
.
texPngData
){
var
o
=
n
.
texPngData
.
url
,
c
=
n
.
skeJsonData
.
url
,
r
=
n
.
texJsonData
.
url
;
cc
.
loader
.
load
(
o
,
function
(
n
,
o
){
cc
.
loader
.
load
({
url
:
r
,
type
:
"
txt
"
},
function
(
n
,
r
){
cc
.
loader
.
load
({
url
:
c
,
type
:
"
txt
"
},
function
(
n
,
c
){
var
s
=
new
dragonBones
.
DragonBonesAtlasAsset
;
s
.
atlasJson
=
r
,
s
.
texture
=
o
;
var
h
=
new
dragonBones
.
DragonBonesAsset
;
h
.
dragonBonesJson
=
c
,
i
.
dragonAtlasAsset
=
s
,
i
.
dragonAsset
=
h
;
for
(
var
d
=
JSON
.
parse
(
h
.
dragonBonesJson
).
armature
,
l
=
[],
u
=
0
;
u
<
d
.
length
;
u
++
)
l
.
push
(
d
[
u
].
name
);
var
g
=
[];
if
(
l
.
length
>
0
){
var
p
=
l
[
0
];
i
.
armatureName
=
p
;
for
(
var
f
=
d
[
0
].
animation
,
m
=
0
;
m
<
f
.
length
;
m
++
)
g
.
push
(
f
[
m
].
name
)}
a
.
y
+=
t
.
height
/
2
,
a
.
x
+=
t
.
width
/
2
,
a
.
scaleX
=
t
.
width
/
a
.
width
,
a
.
scaleY
=
t
.
height
/
a
.
height
;
for
(
var
v
=
e
.
changeOption
,
w
=
[],
y
=
0
;
y
<
v
.
length
;
y
++
){
var
C
=
v
[
y
];
console
.
log
(
"
opData: ~~~
"
,
C
),
"
opacity
"
==
C
[
0
]
&&
(
a
.
opacity
=
Number
(
C
[
1
]
/
100
*
255
)
+
.
1
,
console
.
log
(
a
.
opacity
),
w
.
push
({
item
:
a
,
option
:
'
{"
'
+
C
[
0
]
+
'
" :
'
+
C
[
2
]
/
100
*
255
+
"
}
"
,
optionName
:
null
==
C
[
2
]?
""
:
C
[
0
]})),
e
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
e
,
a
){
t
.
audioClip
=
a
}),
t
.
addComponent
(
cc
.
Button
),
t
.
on
(
"
click
"
,
function
(){
t
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
t
.
audioClip
,
!
1
,.
8
)),
t
.
isClicked
,
t
.
isClicked
=!
0
;
for
(
var
a
=
0
;
a
<
w
.
length
;
a
++
){
var
n
=
w
[
a
];
console
.
log
(
"
tweenData:
"
,
n
),
n
.
optionName
&&
cc
.
tween
(
n
.
item
).
to
(
e
.
changeTime
,
JSON
.
parse
(
n
.
option
)).
start
()}
g
.
length
>
0
&&
i
.
playAnimation
(
g
[
0
],
1
)})}})})})}},
a
.
setOneAnimaSmall
=
function
(
t
){
var
e
=
this
.
hotZoneBg
.
scale
*
this
.
hotZoneBg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
,
a
=
new
cc
.
Node
;
a
.
name
=
"
rect
"
+
t
.
index
,
this
.
hotZoneBg
.
addChild
(
a
);
var
n
=
a
.
addComponent
(
cc
.
Graphics
);
n
.
lineWidth
=
4
,
n
.
strokeColor
=
cc
.
Color
.
BLACK
,
n
.
fillColor
=
cc
.
Color
.
WHITE
.
setA
(
100
);
var
i
=
e
/
this
.
hotZoneBg
.
scaleY
;
a
.
width
=
t
.
rect
.
width
*
i
,
a
.
height
=
t
.
rect
.
height
*
i
,
a
.
x
=-
this
.
hotZoneBg
.
width
/
2
+
t
.
rect
.
x
*
i
,
a
.
y
=
this
.
hotZoneBg
.
height
/
2
-
t
.
rect
.
height
*
i
-
t
.
rect
.
y
*
i
,
a
.
anchorX
=
a
.
anchorY
=
0
,
this
.
data
.
bgItem
.
isShowDebugLine
&&
n
.
rect
(
0
,
0
,
a
.
width
,
a
.
height
),
n
.
stroke
(),
n
.
fill
();
var
o
=
new
cc
.
Node
;
o
.
name
=
"
anima_
"
+
t
.
index
,
this
.
hotZoneBg
.
addChild
(
o
),
t
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
t
.
audio_url
,
function
(
t
,
e
){
o
.
audioClip
=
e
});
var
c
=
o
.
addComponent
(
dragonBones
.
ArmatureDisplay
);
if
(
t
.
texPngData
){
var
r
=
t
.
texPngData
.
url
,
s
=
t
.
skeJsonData
.
url
,
h
=
t
.
texJsonData
.
url
;
cc
.
loader
.
load
(
r
,
function
(
t
,
e
){
cc
.
loader
.
load
({
url
:
h
,
type
:
"
txt
"
},
function
(
t
,
n
){
cc
.
loader
.
load
({
url
:
s
,
type
:
"
txt
"
},
function
(
t
,
i
){
var
r
=
new
dragonBones
.
DragonBonesAtlasAsset
;
r
.
atlasJson
=
n
,
r
.
texture
=
e
;
var
s
=
new
dragonBones
.
DragonBonesAsset
;
s
.
dragonBonesJson
=
i
,
c
.
dragonAtlasAsset
=
r
,
c
.
dragonAsset
=
s
;
for
(
var
h
=
JSON
.
parse
(
s
.
dragonBonesJson
).
armature
,
d
=
[],
l
=
0
;
l
<
h
.
length
;
l
++
)
d
.
push
(
h
[
l
].
name
);
if
(
d
.
length
>
0
){
var
u
=
d
[
0
];
c
.
armatureName
=
u
;
for
(
var
g
=
h
[
0
].
animation
,
p
=
[],
f
=
0
;
f
<
g
.
length
;
f
++
)
p
.
push
(
g
[
f
].
name
);
a
.
addComponent
(
cc
.
Button
),
a
.
on
(
"
click
"
,
function
(){
a
.
isClicked
,
a
.
isClicked
=!
0
,
console
.
log
(
"
clicked
"
),
o
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
director
.
emit
(
"
STOP_ALL_AUDIO
"
),
cc
.
audioEngine
.
playEffect
(
o
.
audioClip
,
!
1
,.
8
)),
p
.
length
>
0
&&
c
.
playAnimation
(
p
[
0
],
1
)})}
o
.
x
=
a
.
x
+
a
.
width
/
2
,
o
.
y
=
a
.
y
+
a
.
height
/
2
;
var
m
=
a
.
width
/
o
.
width
,
v
=
a
.
height
/
o
.
height
,
w
=
Math
.
min
(
m
,
v
);
o
.
scale
=
w
})})})}},
a
.
setOnePic
=
function
(
t
){
var
e
=
this
,
a
=
this
.
hotZoneBg
.
scale
*
this
.
hotZoneBg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
,
n
=
new
cc
.
Node
;
n
.
name
=
"
pic
"
+
t
.
index
,
n
.
data
=
t
,
this
.
hotZoneBg
.
addChild
(
n
),
cc
.
loader
.
load
({
url
:
t
.
pic_url
},
function
(
i
,
o
){
n
.
addComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
o
);
var
c
=
a
/
e
.
hotZoneBg
.
scaleY
;
n
.
width
=
t
.
rect
.
width
*
c
,
n
.
height
=
t
.
rect
.
height
*
c
,
n
.
x
=-
e
.
hotZoneBg
.
width
/
2
+
t
.
rect
.
x
*
c
,
n
.
y
=
e
.
hotZoneBg
.
height
/
2
-
t
.
rect
.
height
*
c
-
t
.
rect
.
y
*
c
,
n
.
anchorX
=
n
.
anchorY
=
0
,
t
.
audio_url
&&
e
.
addPicAudio
(
n
)})},
a
.
setOneRect
=
function
(
t
){
var
e
=
this
.
hotZoneBg
.
scale
*
this
.
hotZoneBg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
,
a
=
new
cc
.
Node
;
a
.
name
=
"
rect
"
+
t
.
index
,
this
.
hotZoneBg
.
addChild
(
a
);
var
n
=
a
.
addComponent
(
cc
.
Graphics
);
n
.
lineWidth
=
4
,
n
.
strokeColor
=
cc
.
Color
.
BLACK
,
n
.
fillColor
=
cc
.
Color
.
WHITE
.
setA
(
100
);
var
i
=
e
/
this
.
hotZoneBg
.
scaleY
;
a
.
width
=
t
.
rect
.
width
*
i
,
a
.
height
=
t
.
rect
.
height
*
i
,
a
.
x
=-
this
.
hotZoneBg
.
width
/
2
+
t
.
rect
.
x
*
i
,
a
.
y
=
this
.
hotZoneBg
.
height
/
2
-
t
.
rect
.
height
*
i
-
t
.
rect
.
y
*
i
,
a
.
anchorX
=
a
.
anchorY
=
0
,
this
.
data
.
bgItem
.
isShowDebugLine
&&
n
.
rect
(
0
,
0
,
a
.
width
,
a
.
height
),
n
.
stroke
(),
n
.
fill
(),
t
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
t
.
audio_url
,
function
(
t
,
e
){
a
.
audioClip
=
e
}),
a
.
addComponent
(
cc
.
Button
),
a
.
on
(
"
click
"
,
function
(){
a
.
isClicked
,
a
.
isClicked
=!
0
,
console
.
log
(
"
clicked
"
),
a
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
a
.
audioClip
,
!
1
,.
8
))})},
a
.
addPicAudio
=
function
(
t
){
var
e
=
t
.
data
;
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
e
,
a
){
t
.
audioClip
=
a
}),
t
.
addComponent
(
cc
.
Button
),
t
.
on
(
"
click
"
,
function
(){
t
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
t
.
audioClip
,
!
1
,.
8
))})},
a
)),
cc
.
_RF
.
pop
()},{
"
./util
"
:
"
util
"
}],
util
:[
function
(
t
,
e
,
a
){
"
use strict
"
;
function
n
(
t
,
e
,
a
,
n
,
i
,
o
,
c
){
try
{
var
r
=
t
[
o
](
c
),
s
=
r
.
value
}
catch
(
h
){
return
void
a
(
h
)}
r
.
done
?
e
(
s
):
Promise
.
resolve
(
s
).
then
(
n
,
i
)}
function
i
(
t
){
return
function
(){
var
e
=
this
,
a
=
arguments
;
return
new
Promise
(
function
(
i
,
o
){
var
c
=
t
.
apply
(
e
,
a
);
function
r
(
t
){
n
(
c
,
i
,
o
,
r
,
s
,
"
next
"
,
t
)}
function
s
(
t
){
n
(
c
,
i
,
o
,
r
,
s
,
"
throw
"
,
t
)}
r
(
void
0
)})}}
function
o
(
t
,
e
){
void
0
===
e
&&
(
e
=
0
);
var
a
=
Math
.
max
(
t
,
e
),
n
=
Math
.
min
(
t
,
e
);
return
Math
.
floor
(
Math
.
random
()
*
(
a
-
n
)
+
n
)}
function
c
(
t
,
e
){
cc
.
loader
.
load
({
url
:
t
},
function
(
t
,
a
){
var
n
=
new
cc
.
SpriteFrame
(
a
);
e
&&
e
(
n
)})}
function
r
(
t
,
e
){
if
(
void
0
===
e
&&
(
e
=
null
),
t
){
var
a
=
cc
.
audioEngine
.
playEffect
(
t
,
!
1
,.
8
);
return
e
&&
cc
.
audioEngine
.
setFinishCallback
(
a
,
function
(){
e
()}),
a
}}
function
s
(){
return
h
.
apply
(
this
,
arguments
)}
function
h
(){
return
(
h
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
){
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
t
.
abrupt
(
"
return
"
,
new
Promise
(
function
(
t
,
a
){
try
{
setTimeout
(
function
(){
t
()},
1
e3
*
e
)}
catch
(
n
){
a
(
n
)}}));
case
1
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
cc
.
_RF
.
push
(
e
,
"
25ccfBBvfNLaoaDwk5MOf7U
"
,
"
util
"
),
a
.
__esModule
=!
0
,
a
.
getPosByAngle
=
function
(
t
,
e
){
var
a
=
t
*
Math
.
PI
/
180
;
return
{
x
:
Math
.
sin
(
a
)
*
e
,
y
:
Math
.
cos
(
a
)
*
e
}},
a
.
getAngleByPos
=
function
(
t
,
e
,
a
,
n
){
var
i
=
Math
.
abs
(
t
-
a
),
o
=
Math
.
abs
(
e
-
n
),
c
=
o
/
Math
.
sqrt
(
Math
.
pow
(
i
,
2
)
+
Math
.
pow
(
o
,
2
)),
r
=
Math
.
acos
(
c
),
s
=
Math
.
floor
(
180
/
(
Math
.
PI
/
r
)
*
100
)
/
100
;
return
a
>
t
&&
n
>
e
&&
(
s
=
180
-
s
),
a
===
t
&&
n
>
e
&&
(
s
=
180
),
a
>
t
&&
n
===
e
&&
(
s
=
90
),
a
<
t
&&
n
>
e
&&
(
s
=
180
+
s
),
a
<
t
&&
n
===
e
&&
(
s
=
270
),
a
<
t
&&
n
<
e
&&
(
s
=
360
-
s
),
s
},
a
.
exchangeNodePos
=
function
(
t
,
e
){
return
t
.
convertToNodeSpaceAR
(
e
.
_parent
.
convertToWorldSpaceAR
(
cc
.
v2
(
e
.
x
,
e
.
y
)))},
a
.
RandomInt
=
o
,
a
.
randomSortByArr
=
function
(
t
){
for
(
var
e
=
[],
a
=
t
.
concat
();
a
.
length
>
0
;){
var
n
=
Math
.
floor
(
a
.
length
*
Math
.
random
());
e
.
push
(
a
[
n
]),
a
.
splice
(
n
,
1
)}
return
e
},
a
.
setSprNodeMaxLen
=
function
(
t
,
e
,
a
){
var
n
=
e
/
t
.
width
,
i
=
a
/
t
.
height
,
o
=
Math
.
min
(
n
,
i
);
t
.
scale
=
Math
.
round
(
1
e3
*
o
)
/
1
e3
},
a
.
getSpriteFrimeByUrl
=
c
,
a
.
getSprNode
=
function
(
t
){
var
e
=
cc
.
find
(
"
Canvas/res/img/
"
+
t
).
getComponent
(
cc
.
Sprite
).
spriteFrame
,
a
=
new
cc
.
Node
;
return
a
.
addComponent
(
cc
.
Sprite
).
spriteFrame
=
e
,
a
},
a
.
getSprNodeByUrl
=
function
(
t
,
e
){
var
a
=
(
new
cc
.
Node
).
addComponent
(
cc
.
Sprite
);
c
(
t
,
function
(
t
){
a
.
spriteFrame
=
t
,
e
&&
e
(
a
)})},
a
.
playAudio
=
r
,
a
.
playAudioByUrl
=
function
(
t
,
e
){
void
0
===
e
&&
(
e
=
null
),
t
&&
cc
.
assetManager
.
loadRemote
(
t
,
function
(
t
,
a
){
r
(
a
,
e
)})},
a
.
asyncDelay
=
s
,
a
.
showFireworks
=
l
,
a
.
asyncTweenTo
=
function
(){
return
f
.
apply
(
this
,
arguments
)},
a
.
asyncTweenBy
=
m
,
a
.
showTrebleFirework
=
function
(
t
,
e
){
var
a
=
new
d
(
t
,
e
);
a
.
pos
=
cc
.
v2
(
0
,
-
400
),
a
.
side
=
cc
.
v2
(
0
,
1
e3
),
a
.
range
=
200
,
a
.
number
=
100
,
a
.
scalseRange
=
.
4
;
var
n
=
d
.
copy
(
a
);
n
.
pos
=
cc
.
v2
(
-
600
,
-
400
),
n
.
side
=
cc
.
v2
(
200
,
1
e3
);
var
i
=
d
.
copy
(
a
);
i
.
pos
=
cc
.
v2
(
600
,
-
400
),
i
.
side
=
cc
.
v2
(
-
200
,
1
e3
),
l
(
a
),
l
(
n
),
l
(
i
)},
a
.
delayCall
=
function
(
t
,
e
){
return
cc
.
tween
({}).
delay
(
t
).
call
(
function
(){
e
&&
e
()}).
start
()},
a
.
FireworkSettings
=
void
0
;
var
d
=
function
(){
function
t
(
t
,
e
,
a
,
n
,
i
,
o
,
c
){
void
0
===
a
&&
(
a
=
cc
.
v2
(
0
,
0
)),
void
0
===
n
&&
(
n
=
cc
.
v2
(
0
,
100
)),
void
0
===
i
&&
(
i
=
50
),
void
0
===
o
&&
(
o
=
100
),
void
0
===
c
&&
(
c
=
0
),
this
.
baseNode
=
void
0
,
this
.
nodeList
=
void
0
,
this
.
pos
=
void
0
,
this
.
side
=
void
0
,
this
.
range
=
void
0
,
this
.
number
=
void
0
,
this
.
scalseRange
=
void
0
,
this
.
baseNode
=
t
,
this
.
nodeList
=
e
,
this
.
pos
=
a
,
this
.
side
=
n
,
this
.
range
=
i
,
this
.
number
=
o
,
this
.
scalseRange
=
c
}
return
t
.
copy
=
function
(
e
){
return
new
t
(
e
.
baseNode
,
e
.
nodeList
,
e
.
pos
,
e
.
side
,
e
.
range
,
e
.
number
)},
t
}();
function
l
(){
return
u
.
apply
(
this
,
arguments
)}
function
u
(){
return
(
u
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
){
var
a
,
n
,
c
,
r
,
h
,
d
,
l
;
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
a
=
e
.
baseNode
,
n
=
e
.
nodeList
,
c
=
e
.
pos
,
r
=
e
.
side
,
h
=
e
.
range
,
d
=
e
.
number
,
l
=
e
.
scalseRange
,
new
Array
(
d
).
fill
(
"
"
).
forEach
(
function
(){
var
t
=
i
(
regeneratorRuntime
.
mark
(
function
t
(){
var
e
,
i
,
d
,
u
;
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
(
e
=
new
cc
.
Node
).
parent
=
a
,
e
.
x
=
c
.
x
,
e
.
y
=
c
.
y
,
e
.
angle
=
60
*
Math
.
random
()
-
30
,(
i
=
cc
.
instantiate
(
n
[
o
(
n
.
length
)])).
parent
=
e
,
i
.
active
=!
0
,
i
.
x
=
0
,
i
.
y
=
0
,
i
.
angle
=
0
,
i
.
scale
=
(
Math
.
random
()
-
.
5
)
*
l
+
1
,
d
=
Math
.
random
(),
u
=
Math
.
PI
*
(
2
*
Math
.
random
()
-
1
),
t
.
next
=
16
,
m
(
e
,.
3
,{
x
:
r
.
x
*
d
+
Math
.
cos
(
u
)
*
h
*
d
,
y
:
r
.
y
*
d
+
Math
.
sin
(
u
)
*
h
*
d
},{
easing
:
"
quadIn
"
});
case
16
:
return
cc
.
tween
(
e
).
by
(
8
,{
y
:
-
2
e3
}).
start
(),
cc
.
tween
(
e
).
to
(
5
,{
scale
:(
Math
.
random
()
-
.
5
)
*
l
+
1
}).
start
(),
g
(
e
),
t
.
next
=
21
,
s
(
Math
.
random
());
case
21
:
cc
.
tween
(
i
).
by
(.
15
,{
x
:
-
10
,
angle
:
-
10
}).
by
(.
3
,{
x
:
20
,
angle
:
20
}).
by
(.
15
,{
x
:
-
10
,
angle
:
-
10
}).
union
().
repeatForever
().
start
(),
cc
.
tween
(
e
).
delay
(
5
).
to
(.
3
,{
opacity
:
0
}).
call
(
function
(){
i
.
stopAllActions
(),
i
.
active
=!
1
,
i
.
parent
=
null
,
i
=
null
}).
start
();
case
23
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}));
return
function
(
e
,
a
){
return
t
.
apply
(
this
,
arguments
)}}());
case
2
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
function
g
(){
return
p
.
apply
(
this
,
arguments
)}
function
p
(){
return
(
p
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
){
var
a
,
n
;
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
a
=
1
+
Math
.
random
(),
n
=
o
(
-
200
,
200
)
*
a
,
t
.
next
=
4
,
m
(
e
,
a
,{
x
:
n
,
angle
:
60
*
n
/
200
});
case
4
:
g
(
e
);
case
5
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
function
f
(){
return
(
f
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
,
a
,
n
,
i
){
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
void
0
===
i
&&
(
i
=
void
0
),
t
.
abrupt
(
"
return
"
,
new
Promise
(
function
(
t
,
o
){
try
{
cc
.
tween
(
e
).
to
(
a
,
n
,
i
).
call
(
function
(){
t
()}).
start
()}
catch
(
c
){
o
(
c
)}}));
case
2
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
function
m
(){
return
v
.
apply
(
this
,
arguments
)}
function
v
(){
return
(
v
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
,
a
,
n
,
i
){
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
void
0
===
i
&&
(
i
=
void
0
),
t
.
abrupt
(
"
return
"
,
new
Promise
(
function
(
t
,
o
){
try
{
cc
.
tween
(
e
).
by
(
a
,
n
,
i
).
call
(
function
(){
t
()}).
start
()}
catch
(
c
){
o
(
c
)}}));
case
2
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
a
.
FireworkSettings
=
d
,
cc
.
_RF
.
pop
()},{}]},{},[
"
aks_01
"
,
"
util
"
]);
\ No newline at end of file
window
.
__require
=
function
t
(
e
,
a
,
n
){
function
i
(
c
,
r
){
if
(
!
a
[
c
]){
if
(
!
e
[
c
]){
var
s
=
c
.
split
(
"
/
"
);
if
(
s
=
s
[
s
.
length
-
1
],
!
e
[
s
]){
var
h
=
"
function
"
==
typeof
__require
&&
__require
;
if
(
!
r
&&
h
)
return
h
(
s
,
!
0
);
if
(
o
)
return
o
(
s
,
!
0
);
throw
new
Error
(
"
Cannot find module '
"
+
c
+
"
'
"
)}
c
=
s
}
var
d
=
a
[
c
]
=
{
exports
:{}};
e
[
c
][
0
].
call
(
d
.
exports
,
function
(
t
){
return
i
(
e
[
c
][
1
][
t
]
||
t
)},
d
,
d
.
exports
,
t
,
e
,
a
,
n
)}
return
a
[
c
].
exports
}
for
(
var
o
=
"
function
"
==
typeof
__require
&&
__require
,
c
=
0
;
c
<
n
.
length
;
c
++
)
i
(
n
[
c
]);
return
i
}({
aks_01
:[
function
(
t
,
e
){
"
use strict
"
;
cc
.
_RF
.
push
(
e
,
"
1e6c5bmzb5Cw7tGU+6pyb+T
"
,
"
aks_01
"
);
var
a
,
n
=
t
(
"
./util
"
);
cc
.
Class
(((
a
=
{
extends
:
cc
.
Component
,
properties
:{
baseWidth
:{
default
:
1280
,
type
:
cc
.
Integer
},
baseHeight
:{
default
:
720
,
type
:
cc
.
Integer
}},
onLoad
:
function
(){
cc
.
debug
.
setDisplayStats
(
!
1
),
this
.
initSceneData
(),
this
.
initSize
()},
initSceneData
:
function
(){
this
.
_imageResList
=
[],
this
.
_audioResList
=
[],
this
.
_animaResList
=
[]},
_designSize
:
null
,
_frameSize
:
null
,
_mapScaleMin
:
null
,
_mapScaleMax
:
null
,
_cocosScale
:
null
,
canvas
:
null
,
initSize
:
function
(){
var
t
=
cc
.
view
.
getFrameSize
().
width
/
cc
.
view
.
getFrameSize
().
height
>=
cc
.
Canvas
.
instance
.
designResolution
.
width
/
cc
.
Canvas
.
instance
.
designResolution
.
height
;
cc
.
Canvas
.
instance
.
fitHeight
=
t
,
cc
.
Canvas
.
instance
.
fitWidth
=!
t
;
var
e
=
cc
.
view
.
getFrameSize
();
this
.
_frameSize
=
e
,
this
.
_designSize
=
cc
.
view
.
getDesignResolutionSize
();
var
a
=
cc
.
winSize
.
width
/
e
.
width
,
n
=
cc
.
winSize
.
height
/
e
.
height
;
this
.
_cocosScale
=
Math
.
min
(
a
,
n
),
a
=
e
.
width
/
this
.
_designSize
.
width
,
n
=
e
.
height
/
this
.
_designSize
.
height
,
this
.
_mapScaleMin
=
Math
.
min
(
a
,
n
)
*
this
.
_cocosScale
,
this
.
_mapScaleMax
=
Math
.
max
(
a
,
n
)
*
this
.
_cocosScale
,
this
.
canvas
=
cc
.
find
(
"
Canvas
"
)},
isTeacher
:
null
,
serverAllUser
:
null
,
start
:
function
(){
var
t
=
this
,
e
=
this
.
getData
.
bind
(
this
);
window
&&
window
.
courseware
&&
(
e
=
window
.
courseware
.
getData
),
e
(
function
(
e
,
a
){
var
n
,
i
,
o
;
"
tea
"
==
(
null
==
(
n
=
window
.
air
)?
void
0
:
null
==
(
i
=
n
.
airClassInfo
)?
void
0
:
null
==
(
o
=
i
.
user
)?
void
0
:
o
.
classRole
)
&&
(
t
.
isTeacher
=!
0
),
a
&&
(
console
.
log
(
"
aspect :
"
,
a
),
t
.
serverAllUser
=
a
.
all_user
,
t
.
initPageData
(
a
)),
console
.
log
(
"
data:
"
,
e
),
t
.
data
=
e
||
t
.
getDefaultData
(),
t
.
preloadItem
()})},
_imageResList
:
null
,
_audioResList
:
null
,
_animaResList
:
null
,
preloadItem
:
function
(){
this
.
preload
()},
getData
:
function
(
t
){
t
(
this
.
getDefaultData
())},
getDefaultData
:
function
(){
return
JSON
.
parse
(
'
{"customAction":{"type":"text","changeStart":[["color","#ff00ff"],["size","30px"]],"changeEnd":[["color","#ffffff"],["size","33px"]],"changeTime":"0.5","pic_url":"http://staging-teach.cdn.ireadabc.com/071c713ba8b0bc9c6399a42ac8811082.png","text":"aaaa"},"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/c2cb9a9f65af3b853e57a22a6602e481.png","rect":{"x":209.51,"y":0,"width":851.97,"height":479}},"hotZoneItemArr":[{"id":"1614839864479","index":0,"audio_url":"http://staging-teach.cdn.ireadabc.com/32258b839eca32b6ccf94f3dd6c86e0c.mp3","itemType":"rect","fontScale":0.99296875,"imgScale":1,"mapScale":0.99296875,"gIdx":"2","rect":{"x":554.19,"y":138.28,"width":76.37,"height":72.85}},{"id":"1614840901996","index":1,"pic_url":"http://staging-teach.cdn.ireadabc.com/c8abf7383d65bcbdba8f390785cece60.png","itemType":"pic","fontScale":0.99296875,"imgScale":0.4963768115942029,"mapScale":0.99296875,"gIdx":"1","rect":{"x":699.35,"y":162.22,"width":137,"height":137}},{"id":"1614840912007","index":2,"audio_url":"http://staging-teach.cdn.ireadabc.com/85cff126986f5cc11b05e95181da5869.mp3","itemType":"text","fontScale":0.99296875,"imgScale":1,"mapScale":0.99296875,"gIdx":"3","actionData_3":{"type":"text","changeStart":[],"changeEnd":[],"changeTime":0.3,"changeOption":[["fontColor","#00ffff","#00ffff"],["fontSize","100","100"],["opacity","0","100"]],"text":"dddddg","audio_url":"http://staging-teach.cdn.ireadabc.com/5285e1e88a26a08783757e9c43a8653f.mp3"},"rect":{"width":371.17,"height":99.3,"x":306.63,"y":8.14}},{"id":"1614842879059","index":3,"audio_url":"http://staging-teach.cdn.ireadabc.com/cd8daa8b4d8ff707b3a3680e80bc4761.mp3","itemType":"rect","fontScale":0.99296875,"imgScale":1,"mapScale":0.99296875,"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/c5c80dbe4df2fe619f67b4d8a99d15c8.json","name":"a_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/df141aa05ea55b3835ef2ebfc6685d48.json","name":"a_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/adbfe4292df235154c88737fe22cdba0.png","name":"a_tex.png"},"gIdx":"0","rect":{"x":111.27,"y":277.23,"width":76.31,"height":76.31}},{"id":"1614932660076","index":4,"itemType":"pic","fontScale":0.99296875,"imgScale":1.134480587666508,"mapScale":0.99296875,"gIdx":"4","actionData_4":{"type":"pic","skeJsonData":{},"texJsonData":{},"texPngData":{},"changeStart":[],"changeEnd":[],"changeTime":0.3,"changeOption":[["scale","1"],["opacity","50","100"]],"pic_url":"http://staging-teach.cdn.ireadabc.com/97eb28e4c023f92efde4310d590be985.png","audio_url":"http://staging-teach.cdn.ireadabc.com/c693181b18d5b8e018cdd0dbbd8a8466.mp3"},"rect":{"x":715.92,"y":310,"width":110.04,"height":144.08}},{"id":"1616741577774","index":5,"itemType":"rect","fontScale":0.99296875,"imgScale":1,"mapScale":0.99296875,"gIdx":"5","actionData_5":{"type":"anima","skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/c5c80dbe4df2fe619f67b4d8a99d15c8.json","name":"a_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/df141aa05ea55b3835ef2ebfc6685d48.json","name":"a_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/adbfe4292df235154c88737fe22cdba0.png","name":"a_tex.png"},"changeStart":[],"changeEnd":[],"changeTime":0.3,"changeOption":[["scale","1"],["opacity","0","100"]],"audio_url":"http://staging-teach.cdn.ireadabc.com/c693181b18d5b8e018cdd0dbbd8a8466.mp3"},"rect":{"x":11.48,"y":7,"width":147.01,"height":147.01}}],"title":"Look and Say","title_audio_url":"http://staging-teach.cdn.ireadabc.com/85cff126986f5cc11b05e95181da5869.mp3"}
'
)},
preload
:
function
(){
var
t
=
this
,
e
=
this
.
_imageResList
.
concat
(
this
.
_audioResList
).
concat
(
this
.
_animaResList
);
cc
.
assetManager
.
loadAny
(
e
,
null
,
null
,
function
(){
t
.
addServerListener
(),
window
&&
window
.
air
&&
window
.
air
.
hideAirClassLoading
()})},
addPreloadImage
:
function
(){
var
t
=
this
;
this
.
data
.
bgItem
&&
this
.
_imageResList
.
push
({
url
:
this
.
data
.
bgItem
.
url
}),
this
.
data
.
hotZoneItemArr
&&
this
.
data
.
hotZoneItemArr
.
forEach
(
function
(
e
){
e
.
pic_url
&&
t
.
_imageResList
.
push
({
url
:
e
.
pic_url
})})},
addPreloadAudio
:
function
(){
var
t
=
this
;
this
.
_audioResList
.
push
({
url
:
this
.
data
.
title_audio_url
||
""
}),
this
.
data
.
hotZoneItemArr
&&
this
.
data
.
hotZoneItemArr
.
forEach
(
function
(
e
){
t
.
_audioResList
.
push
({
url
:
e
.
audio_url
})})},
addPreloadAnima
:
function
(){
var
t
=
this
;
this
.
data
.
hotZoneItemArr
&&
this
.
data
.
hotZoneItemArr
.
forEach
(
function
(
e
){
e
.
skeJsonData
&&
(
t
.
_animaResList
.
push
({
url
:
e
.
skeJsonData
.
url
||
""
}),
t
.
_animaResList
.
push
({
url
:
e
.
texJsonData
.
url
||
""
}),
t
.
_animaResList
.
push
({
url
:
e
.
texPngData
.
url
||
""
}))})},
loadEnd
:
function
(){
this
.
initData
(),
this
.
initView
()},
initMusic
:
function
(){
cc
.
assetManager
.
loadRemote
(
this
.
data
.
bg_audio_url
,
function
(
t
,
e
){
cc
.
audioEngine
.
setMusicVolume
(.
3
),
cc
.
audioEngine
.
playMusic
(
e
,
!
0
)})},
pageData
:
null
,
initPageData
:
function
(
t
){
var
e
,
a
=
null
==
t
?
void
0
:
null
==
(
e
=
t
.
page_aspect
)?
void
0
:
e
.
pagedata
;
this
.
pageData
=
a
?
JSON
.
parse
(
a
):{},
console
.
log
(
"
this.pageData:
"
,
this
.
pageData
)},
setPageData
:
function
(
t
,
e
){
this
.
pageData
&&
(
this
.
pageData
[
t
]
=
e
,
this
.
sendPageData
())},
getPageData
:
function
(
t
){
if
(
this
.
pageData
&&
this
.
pageData
[
t
])
return
this
.
pageData
[
t
]},
sendPageData
:
function
(){
var
t
=
this
.
pageData
;
if
(
window
&&
window
.
courseware
){
var
e
=
window
.
courseware
.
storePageAspect
;
e
&&
(
e
(
t
),
console
.
log
(
"
storePageAspect :
"
,
t
))}},
smogArr
:
null
,
initData
:
function
(){
this
.
smogArr
=
[],
this
.
initAudioEffect
()},
tip1Clip
:
null
,
tip2Clip
:
null
,
tip3Clip
:
null
,
magicAppearClip
:
null
,
bgClip
:
null
,
btnClip
:
null
,
walkClip
:
null
,
initAudioEffect
:
function
(){
this
.
tip1Clip
=
cc
.
find
(
"
Canvas/res/audio/tip_1
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
tip2Clip
=
cc
.
find
(
"
Canvas/res/audio/tip_2
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
tip3Clip
=
cc
.
find
(
"
Canvas/res/audio/tip_3
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
magicAppearClip
=
cc
.
find
(
"
Canvas/res/audio/magic_appear
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
bgClip
=
cc
.
find
(
"
Canvas/res/audio/bg
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
btnClip
=
cc
.
find
(
"
Canvas/res/audio/btn
"
).
getComponent
(
cc
.
AudioSource
).
clip
,
this
.
walkClip
=
cc
.
find
(
"
Canvas/res/audio/walk
"
).
getComponent
(
cc
.
AudioSource
).
clip
},
playBgMusic
:
function
(){
var
t
=
this
;(
0
,
n
.
playAudio
)(
this
.
bgClip
,
function
(){
t
.
playBgMusic
()})},
sendServerEvent
:
function
(
t
,
e
){
var
a
=
window
.
courseware
;
a
&&
a
.
sendEvent
(
t
,
e
)},
addServerListener
:
function
(){
var
t
=
this
;
console
.
log
(
"
in addServerListener
"
),
window
.
air
&&
(
window
.
air
.
onCourseInScreen
=
function
(
e
){
t
.
showTemplateStartAnima
(),
t
.
loadEnd
(),
e
()});
var
e
=
window
.
courseware
;
e
&&
(
this
.
isTeacher
&&
e
.
onEvent
(
"
check_enter_next_template
"
,
function
(
e
,
a
){
t
.
checkEnterNextTemplate
(
e
),
a
()}),
e
.
onEvent
(
"
btn_click
"
,
function
(
e
,
a
){
t
.
btnClick
(),
a
()}))},
checkEnterNextTemplate
:
function
(){},
showTemplateStartAnima
:
function
(){
var
t
=
cc
.
find
(
"
Canvas/res/anima/pageturn
"
),
e
=
cc
.
instantiate
(
t
);
e
.
scale
=
this
.
_mapScaleMax
,
cc
.
find
(
"
Canvas
"
).
addChild
(
e
,
100
);
var
a
=
e
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
a
.
on
(
dragonBones
.
EventObject
.
COMPLETE
,
function
(){
e
.
removeFromParent
()}),
a
.
playAnimation
(
"
pageturn2
"
,
1
)},
showTemplateEndAnima
:
function
(){
var
t
=
this
,
e
=
cc
.
find
(
"
Canvas/res/anima/pageturn
"
),
a
=
cc
.
instantiate
(
e
);
cc
.
find
(
"
Canvas
"
).
addChild
(
a
,
100
);
var
n
=
a
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
n
.
on
(
dragonBones
.
EventObject
.
COMPLETE
,
function
(){
cc
.
tween
({}).
delay
(
1
).
call
(
function
(){
window
&&
window
.
courseware
&&
t
.
isTeacher
&&
window
.
courseware
.
nextPage
()}).
start
()}),
n
.
playAnimation
(
"
pageturn
"
,
1
)},
initView
:
function
(){
this
.
initTree
(),
this
.
playBgMusic
(),
"
1
"
==
this
.
data
.
isEndStyle
?
this
.
showEndStyle
():(
this
.
initTitle
(),
this
.
initSmog
(),
this
.
showSound
())},
showEndStyle
:
function
(){
this
.
hideEdge
(),
this
.
addMagicBg
(),
this
.
enlargeMap
(),
this
.
addRole
()},
hideEdge
:
function
(){
cc
.
find
(
"
Canvas/bg_leftbottom
"
).
active
=!
1
,
cc
.
find
(
"
Canvas/bg_rightbottom
"
).
active
=!
1
,
cc
.
find
(
"
Canvas/bg_righttop
"
).
active
=!
1
,
cc
.
find
(
"
Canvas/bg_lefttop
"
).
active
=!
1
},
addRole
:
function
(){
var
t
=
this
;
console
.
log
(
"
in showMagic
"
);
var
e
=
cc
.
find
(
"
Canvas/res/anima/role
"
),
a
=
cc
.
instantiate
(
e
);
a
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
walk
"
,
-
1
),
a
.
parent
=
cc
.
find
(
"
Canvas/bg_door
"
),
a
.
x
=-
this
.
canvas
.
width
/
2
,
a
.
y
=-
30
,
cc
.
tween
(
a
).
to
(
4
,{
x
:
0
}).
start
(),
cc
.
tween
(
a
).
delay
(
3
).
to
(
1
,{
opacity
:
0
},{
easing
:
"
cubicIn
"
}).
call
(
function
(){
cc
.
audioEngine
.
stop
(
i
),
t
.
showTemplateEndAnima
()}).
start
();
var
i
=
(
0
,
n
.
playAudio
)(
this
.
walkClip
,
function
(){})},
enlargeMap
:
function
(){
this
.
canvas
.
scale
*=
1.2
},
addMagicBg
:
function
(){
var
t
=
cc
.
find
(
"
Canvas/res/anima/magic
"
),
e
=
cc
.
instantiate
(
t
);
e
.
getComponent
(
dragonBones
.
ArmatureDisplay
).
playAnimation
(
"
spinturn
"
,
-
1
),
e
.
parent
=
cc
.
find
(
"
Canvas/bg_door
"
)},
showSound
:
function
(){
var
t
=
this
;
this
.
showPanel1
(),(
0
,
n
.
playAudio
)(
this
.
tip1Clip
,
function
(){
t
.
tip1ShowEnd
()})},
tip1ShowEnd
:
function
(){
var
t
=
this
;
this
.
showMagic
(),(
0
,
n
.
playAudio
)(
this
.
tip2Clip
,
function
(){
t
.
tip2ShowEnd
()})},
tip2ShowEnd
:
function
(){
this
.
showBtn
(),
this
.
showPanel2
()},
panel1
:
null
,
showPanel1
:
function
(){
if
(
this
.
isTeacher
){
var
t
=
(
0
,
n
.
getSprNode
)(
"
bg_ti1
"
);
t
.
scale
=
this
.
_mapScaleMin
,
t
.
parent
=
cc
.
find
(
"
Canvas
"
),
t
.
zIndex
=
20
,
t
.
anchorY
=
0
,
t
.
y
=-
this
.
canvas
.
height
/
2
,
this
.
panel1
=
t
,
t
.
baseY
=
t
.
y
,
t
.
y
-=
t
.
height
/
2
*
t
.
scaleY
,
cc
.
tween
(
t
).
to
(
1
,{
y
:
t
.
baseY
},{
easing
:
"
cubicOut
"
}).
start
()}},
panel2
:
null
,
showPanel2
:
function
(){
if
(
this
.
isTeacher
){
var
t
=
(
0
,
n
.
getSprNode
)(
"
bg_ti2
"
);
t
.
scale
=
this
.
_mapScaleMin
,
t
.
parent
=
cc
.
find
(
"
Canvas
"
),
t
.
zIndex
=
30
,
t
.
anchorY
=
0
,
t
.
y
=-
this
.
canvas
.
height
/
2
,
t
.
opacity
=
0
,
this
.
panel2
=
t
,
cc
.
tween
(
this
.
panel1
).
delay
(.
3
).
to
(.
3
,{
opacity
:
0
}).
start
(),
cc
.
tween
(
t
).
to
(.
3
,{
opacity
:
255
}).
start
()}},
showMagic
:
function
(){
console
.
log
(
"
in showMagic
"
);
var
t
=
cc
.
find
(
"
Canvas/res/anima/magic
"
),
e
=
cc
.
instantiate
(
t
),
a
=
e
.
getComponent
(
dragonBones
.
ArmatureDisplay
);
a
.
on
(
dragonBones
.
EventObject
.
COMPLETE
,
function
(){
a
.
playAnimation
(
"
spinturn
"
,
-
1
)}),
a
.
playAnimation
(
"
appear
"
,
1
),
e
.
parent
=
cc
.
find
(
"
Canvas/bg_door
"
),(
0
,
n
.
playAudio
)(
this
.
magicAppearClip
)},
btn
:
null
,
showBtn
:
function
(){
var
t
=
this
;
console
.
log
(
"
in showBtn
"
);
var
e
=
(
0
,
n
.
getSprNode
)(
"
btn_go
"
);
e
.
parent
=
this
.
canvas
,
e
.
zIndex
=
50
,
e
.
scale
=
this
.
_mapScaleMin
,
e
.
x
=
230
*
this
.
_mapScaleMin
,
e
.
y
=-
this
.
canvas
.
height
/
2
+
230
*
this
.
_mapScaleMin
,
e
.
addComponent
(
cc
.
Button
),
e
.
on
(
"
click
"
,
function
(){
t
.
sendServerEvent
(
"
btn_click
"
)}),
e
.
opacity
=
0
,
this
.
btn
=
e
,
cc
.
tween
(
e
).
to
(.
5
,{
opacity
:
255
}).
start
(),
this
.
showHand
()},
btnClick
:
function
(){
var
t
=
this
;
this
.
btn
&&
0
!=
this
.
btn
.
opacity
&&
(
this
.
btn
.
opacity
=
0
,(
0
,
n
.
playAudio
)(
this
.
btnClip
),(
0
,
n
.
playAudio
)(
this
.
tip3Clip
,
function
(){
t
.
showTemplateEndAnima
()}))},
showHand
:
function
(){
console
.
log
(
"
in showHand
"
);
var
t
=
(
0
,
n
.
getSprNode
)(
"
icon_hand1
"
);
t
.
parent
=
this
.
btn
,
t
.
x
=
100
,
t
.
y
=-
60
;
var
e
=
(
0
,
n
.
getSprNode
)(
"
icon_hand2
"
);
e
.
parent
=
this
.
btn
,
e
.
x
=
t
.
x
,
e
.
y
=
t
.
y
,
e
.
opacity
=
0
,
this
.
btn
.
hand1
=
t
,
this
.
btn
.
hand2
=
e
,
this
.
showHandAnima
()},
showHandAnima
:
function
(){
var
t
=
this
,
e
=
this
.
btn
.
hand1
,
a
=
this
.
btn
.
hand2
;
0
==
e
.
opacity
?
cc
.
tween
(
this
.
btn
).
delay
(.
2
).
call
(
function
(){
e
.
opacity
=
255
,
a
.
opacity
=
0
,
t
.
showHandAnima
()}).
start
():
cc
.
tween
(
this
.
btn
).
delay
(.
5
).
call
(
function
(){
e
.
opacity
=
0
,
a
.
opacity
=
255
,
t
.
showHandAnima
()}).
start
()},
initSmog
:
function
(){
this
.
addSmog
(
-
this
.
canvas
.
width
/
1.5
,
!
1
),
this
.
addSmog
(
-
this
.
canvas
.
width
/
2
,
!
1
),
this
.
addSmog
(
-
this
.
canvas
.
width
/
2
+
this
.
canvas
.
width
/
3
,
!
1
),
this
.
addSmog
(
-
this
.
canvas
.
width
/
2
+
this
.
canvas
.
width
/
3
*
2
)},
addSmog
:
function
(
t
,
e
){
var
a
=
this
;
void
0
===
e
&&
(
e
=!
0
);
var
i
,
o
=
cc
.
find
(
"
Canvas/bg_door
"
);
this
.
smogArr
.
length
>
0
?
i
=
this
.
smogArr
.
pop
():(
i
=
(
0
,
n
.
getSprNode
)(
"
bg_smog
"
),
o
.
addChild
(
i
)),
i
.
scale
=
this
.
_mapScaleMin
*
(.
5
+
.
7
*
Math
.
random
()),
i
.
x
=
t
,
i
.
y
=
80
*
Math
.
random
()
-
140
,
i
.
zIndex
=
10
,
Math
.
random
()
>
.
5
&&
(
i
.
scaleX
*=-
1
);
var
c
=
30
+
10
*
Math
.
random
();
cc
.
tween
(
i
).
to
(
c
,{
x
:
this
.
canvas
.
width
}).
call
(
function
(){
a
.
smogArr
.
push
(
i
)}).
start
(),
e
&&
(
0
,
n
.
delayCall
)(
c
/
10
+
c
/
10
*
Math
.
random
(),
function
(){
a
.
addSmog
(
-
a
.
canvas
.
width
)})},
initTree
:
function
(){
this
.
initAppleTree
(),
this
.
initBananaTree
(),
this
.
initOrangeTree
()},
initAppleTree
:
function
(){
for
(
var
t
=
cc
.
find
(
"
Canvas/bg_grass
"
),
e
=-
t
.
width
/
2
,
a
=-
t
.
height
/
2
,
i
=
[[
e
+
133
,
a
+
357
,.
76
],[
e
+
253
,
a
+
269
,
1
],[
e
+
860
,
a
+
355
,.
84
],[
e
+
1045
,
a
+
379
,.
64
],[
e
+
1240
,
a
+
314
,
1
]],
o
=
this
.
canvas
.
width
/
1280
,
c
=
0
;
c
<
i
.
length
;
c
++
){
var
r
=
i
[
c
],
s
=
(
r
[
0
]
+
t
.
width
/
2
)
*
o
,
h
=
(
0
,
n
.
getSprNode
)(
"
bg_apple
"
);
h
.
x
=
e
+
s
,
h
.
y
=
r
[
1
],
h
.
scale
=
r
[
2
],
h
.
anchorY
=
0
,
t
.
addChild
(
h
,
this
.
canvas
.
height
-
h
.
y
),
this
.
addTreeAnima
(
h
)}},
initBananaTree
:
function
(){
for
(
var
t
=
cc
.
find
(
"
Canvas/bg_grass
"
),
e
=-
t
.
width
/
2
,
a
=-
t
.
height
/
2
,
i
=
[[
e
+
14
,
a
+
364
,.
7
],[
e
+
49
,
a
+
294
,.
94
],[
e
+
298
,
a
+
393
,.
7
],[
e
+
1129
,
a
+
261
,
1
],[
e
+
1265
,
a
+
419
,.
7
]],
o
=
this
.
canvas
.
width
/
1280
,
c
=
0
;
c
<
i
.
length
;
c
++
){
var
r
=
i
[
c
],
s
=
(
r
[
0
]
+
t
.
width
/
2
)
*
o
,
h
=
(
0
,
n
.
getSprNode
)(
"
bg_banana
"
);
h
.
x
=
e
+
s
,
h
.
y
=
r
[
1
],
h
.
scale
=
r
[
2
],
h
.
anchorY
=
0
,
t
.
addChild
(
h
,
this
.
canvas
.
height
-
h
.
y
),
this
.
addTreeAnima
(
h
)}},
initOrangeTree
:
function
(){
for
(
var
t
=
cc
.
find
(
"
Canvas/bg_grass
"
),
e
=-
t
.
width
/
2
,
a
=-
t
.
height
/
2
,
i
=
[[
e
+
239
,
a
+
402
,.
82
],[
e
+
916
,
a
+
385
,.
82
],[
e
+
978
,
a
+
293
,
1
],[
e
+
1086
,
a
+
417
,.
72
]],
o
=
this
.
canvas
.
width
/
1280
,
c
=
0
;
c
<
i
.
length
;
c
++
){
var
r
=
i
[
c
],
s
=
(
r
[
0
]
+
t
.
width
/
2
)
*
o
,
h
=
(
0
,
n
.
getSprNode
)(
"
bg_orange
"
);
h
.
x
=
e
+
s
,
h
.
y
=
r
[
1
],
h
.
scale
=
r
[
2
],
h
.
anchorY
=
0
,
t
.
addChild
(
h
,
this
.
canvas
.
height
-
h
.
y
),
this
.
addTreeAnima
(
h
)}},
addTreeAnima
:
function
(
t
){
var
e
=
this
,
a
=
1
+
1
*
Math
.
random
(),
i
=
8
*
a
,
o
=
4
*
a
;
cc
.
tween
(
t
).
to
(
o
/
3
/
2
,{
skewX
:.
3
*
i
},{
easing
:
"
sineInOut
"
}).
to
(
o
/
3
/
1.2
,{
skewX
:
-
.
1
*
i
},{
easing
:
"
sineInOut
"
}).
to
(
o
/
3
,{
skewX
:.
05
*
i
},{
easing
:
"
sineInOut
"
}).
to
(
o
/
3
,{
skewX
:
0
*
i
},{
easing
:
"
sineInOut
"
}).
start
(),(
0
,
n
.
delayCall
)(
o
+
1.5
*
Math
.
random
(),
function
(){
e
.
addTreeAnima
(
t
)})},
initTitle
:
function
(){
var
t
=
20
*
this
.
_mapScaleMin
,
e
=
20
*
this
.
_mapScaleMin
,
a
=
(
0
,
n
.
getSprNode
)(
"
bg_title
"
);
a
.
parent
=
this
.
canvas
,
a
.
scale
=
this
.
_mapScaleMin
,
a
.
zIndex
=
20
,
a
.
x
=-
this
.
canvas
.
width
/
2
+
a
.
width
/
2
*
a
.
scale
+
t
,
a
.
y
=
this
.
canvas
.
height
/
2
-
a
.
height
/
2
*
a
.
scale
-
e
;
var
i
=
cc
.
find
(
"
Canvas/bg_leftbottom
"
),
o
=
cc
.
find
(
"
Canvas/bg_lefttop
"
),
c
=
cc
.
find
(
"
Canvas/bg_rightbottom
"
),
r
=
cc
.
find
(
"
Canvas/bg_righttop
"
);
i
.
scale
=
o
.
scale
=
c
.
scale
=
r
.
scale
=
this
.
_mapScaleMin
}}).
_cocosScale
=
null
,
a
.
initBg
=
function
(){
var
t
=
cc
.
view
.
getFrameSize
(),
e
=
cc
.
winSize
.
width
/
t
.
width
,
a
=
cc
.
winSize
.
height
/
t
.
height
,
n
=
Math
.
min
(
e
,
a
);
this
.
_cocosScale
=
n
;
var
i
=
cc
.
find
(
"
Canvas/bg
"
);
e
=
t
.
width
/
i
.
width
,
a
=
t
.
height
/
i
.
height
,
i
.
scale
=
Math
.
max
(
e
,
a
)
*
n
,
i
.
anchorX
=
1
,
i
.
anchorY
=
0
,
i
.
x
=
t
.
width
/
2
*
n
,
i
.
y
=-
t
.
height
/
2
*
n
;
var
o
=
cc
.
find
(
"
Canvas/bg
"
),
c
=
new
cc
.
Node
;
c
.
x
=-
o
.
x
,
c
.
y
=-
o
.
y
,
c
.
scaleX
=
o
.
scaleX
,
c
.
scaleY
=
o
.
scaleY
,
o
.
addChild
(
c
);
var
r
=
c
.
addComponent
(
cc
.
Graphics
);
r
.
fillColor
=
this
.
data
.
bgColor
||
"
#f9bd03
"
,
r
.
fillRect
(
-
o
.
width
/
2
,
-
o
.
height
/
2
,
o
.
width
,
o
.
height
),
r
.
fill
()},
a
.
initHotZone
=
function
(){
this
.
initHotZoneBg
()},
a
.
hotZoneBg
=
null
,
a
.
initHotZoneBg
=
function
(){
var
t
=
this
;
this
.
hotZoneBg
=
new
cc
.
Node
,
this
.
hotZoneBg
.
name
=
"
hotZoneBg
"
,
this
.
hotZoneBg
.
parent
=
cc
.
find
(
"
Canvas
"
);
var
e
=
107
*
this
.
_mapScaleMin
+
22
;
this
.
data
.
bgItem
&&
cc
.
loader
.
load
({
url
:
this
.
data
.
bgItem
.
url
},
function
(
a
,
n
){
t
.
hotZoneBg
.
width
=
n
.
width
,
t
.
hotZoneBg
.
height
=
n
.
height
;
var
i
=
new
cc
.
Node
;
i
.
name
=
"
bgItemSpr
"
;
var
o
=
new
cc
.
SpriteFrame
(
n
);
i
.
addComponent
(
cc
.
Sprite
).
spriteFrame
=
o
,
i
.
width
=
t
.
hotZoneBg
.
width
,
i
.
height
=
t
.
hotZoneBg
.
height
,
i
.
parent
=
t
.
hotZoneBg
,
window
.
bg
=
i
;
var
c
=
t
.
canvas
.
width
/
t
.
hotZoneBg
.
width
,
r
=
(
t
.
canvas
.
height
-
e
)
/
t
.
hotZoneBg
.
height
,
s
=
Math
.
min
(
c
,
r
);
t
.
hotZoneBg
.
scale
=
s
,
t
.
hotZoneBg
.
y
=
0
-
e
/
2
,
t
.
initHotZoneItem
()})},
a
.
initHotZoneItem
=
function
(){
var
t
=
this
;
this
.
data
.
hotZoneItemArr
.
forEach
(
function
(
e
){
switch
(
e
.
gIdx
){
case
"
0
"
:
t
.
setOneAnimaSmall
(
e
);
break
;
case
"
1
"
:
t
.
setOnePic
(
e
);
break
;
case
"
2
"
:
t
.
setOneRect
(
e
);
break
;
case
"
3
"
:
case
"
4
"
:
case
"
5
"
:
t
.
setOneAction
(
e
)}})},
a
.
addMask
=
function
(
t
){
t
.
addComponent
(
cc
.
Mask
).
type
=
cc
.
Mask
.
Type
.
RECT
},
a
.
setOneAction
=
function
(
t
){
var
e
=
this
.
hotZoneBg
.
scale
*
this
.
hotZoneBg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
,
a
=
new
cc
.
Node
;
a
.
name
=
"
rect
"
+
t
.
index
,
this
.
hotZoneBg
.
addChild
(
a
);
var
n
=
a
.
addComponent
(
cc
.
Graphics
);
n
.
lineWidth
=
4
,
n
.
strokeColor
=
cc
.
Color
.
BLACK
,
n
.
fillColor
=
cc
.
Color
.
WHITE
.
setA
(
100
);
var
i
=
e
/
this
.
hotZoneBg
.
scaleY
;
a
.
width
=
t
.
rect
.
width
*
i
,
a
.
height
=
t
.
rect
.
height
*
i
,
a
.
x
=-
this
.
hotZoneBg
.
width
/
2
+
t
.
rect
.
x
*
i
,
a
.
y
=
this
.
hotZoneBg
.
height
/
2
-
t
.
rect
.
height
*
i
-
t
.
rect
.
y
*
i
,
a
.
x
,
a
.
y
,
a
.
width
,
a
.
height
,
a
.
anchorX
=
a
.
anchorY
=
0
,
this
.
data
.
bgItem
.
isShowDebugLine
&&
n
.
rect
(
0
,
0
,
a
.
width
,
a
.
height
),
n
.
stroke
(),
n
.
fill
(),
console
.
log
(
"
setOneAction ~~ data:
"
,
t
);
var
o
=
t
[
"
actionData_
"
+
t
.
gIdx
];
if
(
o
)
if
(
"
text
"
==
o
.
type
){
var
c
=
this
.
setOneActionText
(
a
,
o
);
c
.
node
.
scale
=
i
*
t
.
fontScale
,
c
.
_forceUpdateRenderData
(
!
0
)}
else
"
pic
"
==
o
.
type
?
this
.
setOneActionPic
(
a
,
o
):
"
anima
"
==
o
.
type
&&
this
.
setOneActionAnima
(
a
,
o
)},
a
.
setOneActionText
=
function
(
t
,
e
){
var
a
=
new
cc
.
Node
;
a
.
parent
=
t
;
var
n
=
a
.
addComponent
(
cc
.
Label
);
n
.
font
=
cc
.
find
(
"
Canvas/res/font/aharoni
"
).
getComponent
(
cc
.
Label
).
font
,
n
.
string
=
e
.
text
,
a
.
color
=
cc
.
Color
.
BLACK
;
for
(
var
i
=
e
.
changeOption
,
o
=
[],
c
=
0
;
c
<
i
.
length
;
c
++
){
var
r
=
i
[
c
];
if
(
console
.
log
(
"
opArr[0]
"
,
i
[
c
]),
"
fontColor
"
==
r
[
0
]){
var
s
=
new
cc
.
Color
;
cc
.
Color
.
fromHEX
(
s
,
r
[
1
]),
a
.
color
=
s
}
else
"
opacity
"
==
r
[
0
]?(
a
.
opacity
=
Number
(
r
[
1
]
/
100
*
255
)
+
.
1
,
o
.
push
({
item
:
a
,
option
:
'
{"
'
+
r
[
0
]
+
'
" :
'
+
r
[
2
]
/
100
*
255
+
"
}
"
,
optionName
:
r
[
0
]})):(
n
[
r
[
0
]]
=
r
[
1
],
o
.
push
({
item
:
n
,
option
:
'
{"
'
+
r
[
0
]
+
'
" :
'
+
r
[
2
]
+
"
}
"
,
optionName
:
r
[
0
]}))}
return
e
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
t
,
e
){
a
.
audioClip
=
e
}),
n
.
lineHeight
=
n
.
fontSize
,
a
.
y
+=
t
.
height
/
2
,
a
.
x
+=
t
.
width
/
2
,
t
.
addComponent
(
cc
.
Button
),
t
.
on
(
"
click
"
,
function
(){
a
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
a
.
audioClip
,
!
1
,.
8
)),
a
.
isClicked
,
a
.
isClicked
=!
0
;
for
(
var
t
=
0
;
t
<
o
.
length
;
t
++
){
var
n
=
o
[
t
];
"
opacity
"
==
n
.
optionName
&&
(
console
.
log
(
"
~~~
"
,
n
.
item
[
n
.
optionName
]),
cc
.
tween
(
n
.
item
).
to
(
e
.
changeTime
,
JSON
.
parse
(
n
.
option
)).
start
())}}),
n
},
a
.
setOneActionPic
=
function
(
t
,
e
){
console
.
log
(
"
setOneActionPic actionData:
"
,
e
);
var
a
=
new
cc
.
Node
;
t
.
addChild
(
a
),
cc
.
loader
.
load
({
url
:
e
.
pic_url
},
function
(
n
,
i
){
a
.
addComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
i
),
a
.
y
+=
t
.
height
/
2
,
a
.
x
+=
t
.
width
/
2
,
a
.
scaleX
=
t
.
width
/
a
.
width
,
a
.
scaleY
=
t
.
height
/
a
.
height
;
for
(
var
o
=
e
.
changeOption
,
c
=
[],
r
=
0
;
r
<
o
.
length
;
r
++
){
var
s
=
o
[
r
];
console
.
log
(
"
opData: ~~~
"
,
s
),
"
opacity
"
==
s
[
0
]
&&
(
a
.
opacity
=
Number
(
s
[
1
]
/
100
*
255
)
+
.
1
,
console
.
log
(
a
.
opacity
),
c
.
push
({
item
:
a
,
option
:
'
{"
'
+
s
[
0
]
+
'
" :
'
+
s
[
2
]
/
100
*
255
+
"
}
"
,
optionName
:
s
[
0
]})),
e
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
e
,
a
){
t
.
audioClip
=
a
}),
t
.
addComponent
(
cc
.
Button
),
t
.
on
(
"
click
"
,
function
(){
t
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
t
.
audioClip
,
!
1
,.
8
)),
t
.
isClicked
,
t
.
isClicked
=!
0
;
for
(
var
a
=
0
;
a
<
c
.
length
;
a
++
){
var
n
=
c
[
a
];
"
opacity
"
==
n
.
optionName
&&
cc
.
tween
(
n
.
item
).
to
(
e
.
changeTime
,
JSON
.
parse
(
n
.
option
)).
start
()}})}})},
a
.
setOneActionAnima
=
function
(
t
,
e
){
var
a
=
new
cc
.
Node
;
t
.
addChild
(
a
),
e
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
e
,
a
){
t
.
audioClip
=
a
});
var
n
=
e
,
i
=
a
.
addComponent
(
dragonBones
.
ArmatureDisplay
);
if
(
n
.
texPngData
){
var
o
=
n
.
texPngData
.
url
,
c
=
n
.
skeJsonData
.
url
,
r
=
n
.
texJsonData
.
url
;
cc
.
loader
.
load
(
o
,
function
(
n
,
o
){
cc
.
loader
.
load
({
url
:
r
,
type
:
"
txt
"
},
function
(
n
,
r
){
cc
.
loader
.
load
({
url
:
c
,
type
:
"
txt
"
},
function
(
n
,
c
){
var
s
=
new
dragonBones
.
DragonBonesAtlasAsset
;
s
.
atlasJson
=
r
,
s
.
texture
=
o
;
var
h
=
new
dragonBones
.
DragonBonesAsset
;
h
.
dragonBonesJson
=
c
,
i
.
dragonAtlasAsset
=
s
,
i
.
dragonAsset
=
h
;
for
(
var
d
=
JSON
.
parse
(
h
.
dragonBonesJson
).
armature
,
l
=
[],
u
=
0
;
u
<
d
.
length
;
u
++
)
l
.
push
(
d
[
u
].
name
);
var
g
=
[];
if
(
l
.
length
>
0
){
var
p
=
l
[
0
];
i
.
armatureName
=
p
;
for
(
var
f
=
d
[
0
].
animation
,
m
=
0
;
m
<
f
.
length
;
m
++
)
g
.
push
(
f
[
m
].
name
)}
a
.
y
+=
t
.
height
/
2
,
a
.
x
+=
t
.
width
/
2
,
a
.
scaleX
=
t
.
width
/
a
.
width
,
a
.
scaleY
=
t
.
height
/
a
.
height
;
for
(
var
v
=
e
.
changeOption
,
w
=
[],
y
=
0
;
y
<
v
.
length
;
y
++
){
var
C
=
v
[
y
];
console
.
log
(
"
opData: ~~~
"
,
C
),
"
opacity
"
==
C
[
0
]
&&
(
a
.
opacity
=
Number
(
C
[
1
]
/
100
*
255
)
+
.
1
,
console
.
log
(
a
.
opacity
),
w
.
push
({
item
:
a
,
option
:
'
{"
'
+
C
[
0
]
+
'
" :
'
+
C
[
2
]
/
100
*
255
+
"
}
"
,
optionName
:
null
==
C
[
2
]?
""
:
C
[
0
]})),
e
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
e
,
a
){
t
.
audioClip
=
a
}),
t
.
addComponent
(
cc
.
Button
),
t
.
on
(
"
click
"
,
function
(){
t
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
t
.
audioClip
,
!
1
,.
8
)),
t
.
isClicked
,
t
.
isClicked
=!
0
;
for
(
var
a
=
0
;
a
<
w
.
length
;
a
++
){
var
n
=
w
[
a
];
console
.
log
(
"
tweenData:
"
,
n
),
n
.
optionName
&&
cc
.
tween
(
n
.
item
).
to
(
e
.
changeTime
,
JSON
.
parse
(
n
.
option
)).
start
()}
g
.
length
>
0
&&
i
.
playAnimation
(
g
[
0
],
1
)})}})})})}},
a
.
setOneAnimaSmall
=
function
(
t
){
var
e
=
this
.
hotZoneBg
.
scale
*
this
.
hotZoneBg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
,
a
=
new
cc
.
Node
;
a
.
name
=
"
rect
"
+
t
.
index
,
this
.
hotZoneBg
.
addChild
(
a
);
var
n
=
a
.
addComponent
(
cc
.
Graphics
);
n
.
lineWidth
=
4
,
n
.
strokeColor
=
cc
.
Color
.
BLACK
,
n
.
fillColor
=
cc
.
Color
.
WHITE
.
setA
(
100
);
var
i
=
e
/
this
.
hotZoneBg
.
scaleY
;
a
.
width
=
t
.
rect
.
width
*
i
,
a
.
height
=
t
.
rect
.
height
*
i
,
a
.
x
=-
this
.
hotZoneBg
.
width
/
2
+
t
.
rect
.
x
*
i
,
a
.
y
=
this
.
hotZoneBg
.
height
/
2
-
t
.
rect
.
height
*
i
-
t
.
rect
.
y
*
i
,
a
.
anchorX
=
a
.
anchorY
=
0
,
this
.
data
.
bgItem
.
isShowDebugLine
&&
n
.
rect
(
0
,
0
,
a
.
width
,
a
.
height
),
n
.
stroke
(),
n
.
fill
();
var
o
=
new
cc
.
Node
;
o
.
name
=
"
anima_
"
+
t
.
index
,
this
.
hotZoneBg
.
addChild
(
o
),
t
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
t
.
audio_url
,
function
(
t
,
e
){
o
.
audioClip
=
e
});
var
c
=
o
.
addComponent
(
dragonBones
.
ArmatureDisplay
);
if
(
t
.
texPngData
){
var
r
=
t
.
texPngData
.
url
,
s
=
t
.
skeJsonData
.
url
,
h
=
t
.
texJsonData
.
url
;
cc
.
loader
.
load
(
r
,
function
(
t
,
e
){
cc
.
loader
.
load
({
url
:
h
,
type
:
"
txt
"
},
function
(
t
,
n
){
cc
.
loader
.
load
({
url
:
s
,
type
:
"
txt
"
},
function
(
t
,
i
){
var
r
=
new
dragonBones
.
DragonBonesAtlasAsset
;
r
.
atlasJson
=
n
,
r
.
texture
=
e
;
var
s
=
new
dragonBones
.
DragonBonesAsset
;
s
.
dragonBonesJson
=
i
,
c
.
dragonAtlasAsset
=
r
,
c
.
dragonAsset
=
s
;
for
(
var
h
=
JSON
.
parse
(
s
.
dragonBonesJson
).
armature
,
d
=
[],
l
=
0
;
l
<
h
.
length
;
l
++
)
d
.
push
(
h
[
l
].
name
);
if
(
d
.
length
>
0
){
var
u
=
d
[
0
];
c
.
armatureName
=
u
;
for
(
var
g
=
h
[
0
].
animation
,
p
=
[],
f
=
0
;
f
<
g
.
length
;
f
++
)
p
.
push
(
g
[
f
].
name
);
a
.
addComponent
(
cc
.
Button
),
a
.
on
(
"
click
"
,
function
(){
a
.
isClicked
,
a
.
isClicked
=!
0
,
console
.
log
(
"
clicked
"
),
o
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
director
.
emit
(
"
STOP_ALL_AUDIO
"
),
cc
.
audioEngine
.
playEffect
(
o
.
audioClip
,
!
1
,.
8
)),
p
.
length
>
0
&&
c
.
playAnimation
(
p
[
0
],
1
)})}
o
.
x
=
a
.
x
+
a
.
width
/
2
,
o
.
y
=
a
.
y
+
a
.
height
/
2
;
var
m
=
a
.
width
/
o
.
width
,
v
=
a
.
height
/
o
.
height
,
w
=
Math
.
min
(
m
,
v
);
o
.
scale
=
w
})})})}},
a
.
setOnePic
=
function
(
t
){
var
e
=
this
,
a
=
this
.
hotZoneBg
.
scale
*
this
.
hotZoneBg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
,
n
=
new
cc
.
Node
;
n
.
name
=
"
pic
"
+
t
.
index
,
n
.
data
=
t
,
this
.
hotZoneBg
.
addChild
(
n
),
cc
.
loader
.
load
({
url
:
t
.
pic_url
},
function
(
i
,
o
){
n
.
addComponent
(
cc
.
Sprite
).
spriteFrame
=
new
cc
.
SpriteFrame
(
o
);
var
c
=
a
/
e
.
hotZoneBg
.
scaleY
;
n
.
width
=
t
.
rect
.
width
*
c
,
n
.
height
=
t
.
rect
.
height
*
c
,
n
.
x
=-
e
.
hotZoneBg
.
width
/
2
+
t
.
rect
.
x
*
c
,
n
.
y
=
e
.
hotZoneBg
.
height
/
2
-
t
.
rect
.
height
*
c
-
t
.
rect
.
y
*
c
,
n
.
anchorX
=
n
.
anchorY
=
0
,
t
.
audio_url
&&
e
.
addPicAudio
(
n
)})},
a
.
setOneRect
=
function
(
t
){
var
e
=
this
.
hotZoneBg
.
scale
*
this
.
hotZoneBg
.
width
/
this
.
data
.
bgItem
.
rect
.
width
,
a
=
new
cc
.
Node
;
a
.
name
=
"
rect
"
+
t
.
index
,
this
.
hotZoneBg
.
addChild
(
a
);
var
n
=
a
.
addComponent
(
cc
.
Graphics
);
n
.
lineWidth
=
4
,
n
.
strokeColor
=
cc
.
Color
.
BLACK
,
n
.
fillColor
=
cc
.
Color
.
WHITE
.
setA
(
100
);
var
i
=
e
/
this
.
hotZoneBg
.
scaleY
;
a
.
width
=
t
.
rect
.
width
*
i
,
a
.
height
=
t
.
rect
.
height
*
i
,
a
.
x
=-
this
.
hotZoneBg
.
width
/
2
+
t
.
rect
.
x
*
i
,
a
.
y
=
this
.
hotZoneBg
.
height
/
2
-
t
.
rect
.
height
*
i
-
t
.
rect
.
y
*
i
,
a
.
anchorX
=
a
.
anchorY
=
0
,
this
.
data
.
bgItem
.
isShowDebugLine
&&
n
.
rect
(
0
,
0
,
a
.
width
,
a
.
height
),
n
.
stroke
(),
n
.
fill
(),
t
.
audio_url
&&
cc
.
assetManager
.
loadRemote
(
t
.
audio_url
,
function
(
t
,
e
){
a
.
audioClip
=
e
}),
a
.
addComponent
(
cc
.
Button
),
a
.
on
(
"
click
"
,
function
(){
a
.
isClicked
,
a
.
isClicked
=!
0
,
console
.
log
(
"
clicked
"
),
a
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
a
.
audioClip
,
!
1
,.
8
))})},
a
.
addPicAudio
=
function
(
t
){
var
e
=
t
.
data
;
cc
.
assetManager
.
loadRemote
(
e
.
audio_url
,
function
(
e
,
a
){
t
.
audioClip
=
a
}),
t
.
addComponent
(
cc
.
Button
),
t
.
on
(
"
click
"
,
function
(){
t
.
audioClip
&&
(
cc
.
audioEngine
.
stopAllEffects
(),
cc
.
audioEngine
.
playEffect
(
t
.
audioClip
,
!
1
,.
8
))})},
a
.
isDestroy
=
null
,
a
.
onDestroy
=
function
(){
this
.
isDestroy
=!
0
,
cc
.
Tween
.
stopAll
(),
cc
.
game
.
canvas
.
style
.
backgroundColor
=
"
#000000
"
},
a
)),
cc
.
_RF
.
pop
()},{
"
./util
"
:
"
util
"
}],
util
:[
function
(
t
,
e
,
a
){
"
use strict
"
;
function
n
(
t
,
e
,
a
,
n
,
i
,
o
,
c
){
try
{
var
r
=
t
[
o
](
c
),
s
=
r
.
value
}
catch
(
h
){
return
void
a
(
h
)}
r
.
done
?
e
(
s
):
Promise
.
resolve
(
s
).
then
(
n
,
i
)}
function
i
(
t
){
return
function
(){
var
e
=
this
,
a
=
arguments
;
return
new
Promise
(
function
(
i
,
o
){
var
c
=
t
.
apply
(
e
,
a
);
function
r
(
t
){
n
(
c
,
i
,
o
,
r
,
s
,
"
next
"
,
t
)}
function
s
(
t
){
n
(
c
,
i
,
o
,
r
,
s
,
"
throw
"
,
t
)}
r
(
void
0
)})}}
function
o
(
t
,
e
){
void
0
===
e
&&
(
e
=
0
);
var
a
=
Math
.
max
(
t
,
e
),
n
=
Math
.
min
(
t
,
e
);
return
Math
.
floor
(
Math
.
random
()
*
(
a
-
n
)
+
n
)}
function
c
(
t
,
e
){
cc
.
loader
.
load
({
url
:
t
},
function
(
t
,
a
){
var
n
=
new
cc
.
SpriteFrame
(
a
);
e
&&
e
(
n
)})}
function
r
(
t
,
e
){
if
(
void
0
===
e
&&
(
e
=
null
),
t
){
var
a
=
cc
.
audioEngine
.
playEffect
(
t
,
!
1
,.
8
);
return
e
&&
cc
.
audioEngine
.
setFinishCallback
(
a
,
function
(){
e
()}),
a
}}
function
s
(){
return
h
.
apply
(
this
,
arguments
)}
function
h
(){
return
(
h
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
){
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
t
.
abrupt
(
"
return
"
,
new
Promise
(
function
(
t
,
a
){
try
{
setTimeout
(
function
(){
t
()},
1
e3
*
e
)}
catch
(
n
){
a
(
n
)}}));
case
1
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
cc
.
_RF
.
push
(
e
,
"
25ccfBBvfNLaoaDwk5MOf7U
"
,
"
util
"
),
a
.
__esModule
=!
0
,
a
.
getPosByAngle
=
function
(
t
,
e
){
var
a
=
t
*
Math
.
PI
/
180
;
return
{
x
:
Math
.
sin
(
a
)
*
e
,
y
:
Math
.
cos
(
a
)
*
e
}},
a
.
getAngleByPos
=
function
(
t
,
e
,
a
,
n
){
var
i
=
Math
.
abs
(
t
-
a
),
o
=
Math
.
abs
(
e
-
n
),
c
=
o
/
Math
.
sqrt
(
Math
.
pow
(
i
,
2
)
+
Math
.
pow
(
o
,
2
)),
r
=
Math
.
acos
(
c
),
s
=
Math
.
floor
(
180
/
(
Math
.
PI
/
r
)
*
100
)
/
100
;
return
a
>
t
&&
n
>
e
&&
(
s
=
180
-
s
),
a
===
t
&&
n
>
e
&&
(
s
=
180
),
a
>
t
&&
n
===
e
&&
(
s
=
90
),
a
<
t
&&
n
>
e
&&
(
s
=
180
+
s
),
a
<
t
&&
n
===
e
&&
(
s
=
270
),
a
<
t
&&
n
<
e
&&
(
s
=
360
-
s
),
s
},
a
.
exchangeNodePos
=
function
(
t
,
e
){
return
t
.
convertToNodeSpaceAR
(
e
.
_parent
.
convertToWorldSpaceAR
(
cc
.
v2
(
e
.
x
,
e
.
y
)))},
a
.
RandomInt
=
o
,
a
.
randomSortByArr
=
function
(
t
){
for
(
var
e
=
[],
a
=
t
.
concat
();
a
.
length
>
0
;){
var
n
=
Math
.
floor
(
a
.
length
*
Math
.
random
());
e
.
push
(
a
[
n
]),
a
.
splice
(
n
,
1
)}
return
e
},
a
.
setSprNodeMaxLen
=
function
(
t
,
e
,
a
){
var
n
=
e
/
t
.
width
,
i
=
a
/
t
.
height
,
o
=
Math
.
min
(
n
,
i
);
t
.
scale
=
Math
.
round
(
1
e3
*
o
)
/
1
e3
},
a
.
getSpriteFrimeByUrl
=
c
,
a
.
getSprNode
=
function
(
t
){
var
e
=
cc
.
find
(
"
Canvas/res/img/
"
+
t
).
getComponent
(
cc
.
Sprite
).
spriteFrame
,
a
=
new
cc
.
Node
;
return
a
.
addComponent
(
cc
.
Sprite
).
spriteFrame
=
e
,
a
},
a
.
getSprNodeByUrl
=
function
(
t
,
e
){
var
a
=
(
new
cc
.
Node
).
addComponent
(
cc
.
Sprite
);
c
(
t
,
function
(
t
){
a
.
spriteFrame
=
t
,
e
&&
e
(
a
)})},
a
.
playAudio
=
r
,
a
.
playAudioByUrl
=
function
(
t
,
e
){
void
0
===
e
&&
(
e
=
null
),
t
&&
cc
.
assetManager
.
loadRemote
(
t
,
function
(
t
,
a
){
r
(
a
,
e
)})},
a
.
asyncDelay
=
s
,
a
.
showFireworks
=
l
,
a
.
asyncTweenTo
=
function
(){
return
f
.
apply
(
this
,
arguments
)},
a
.
asyncTweenBy
=
m
,
a
.
showTrebleFirework
=
function
(
t
,
e
){
var
a
=
new
d
(
t
,
e
);
a
.
pos
=
cc
.
v2
(
0
,
-
400
),
a
.
side
=
cc
.
v2
(
0
,
1
e3
),
a
.
range
=
200
,
a
.
number
=
100
,
a
.
scalseRange
=
.
4
;
var
n
=
d
.
copy
(
a
);
n
.
pos
=
cc
.
v2
(
-
600
,
-
400
),
n
.
side
=
cc
.
v2
(
200
,
1
e3
);
var
i
=
d
.
copy
(
a
);
i
.
pos
=
cc
.
v2
(
600
,
-
400
),
i
.
side
=
cc
.
v2
(
-
200
,
1
e3
),
l
(
a
),
l
(
n
),
l
(
i
)},
a
.
delayCall
=
function
(
t
,
e
){
return
cc
.
tween
({}).
delay
(
t
).
call
(
function
(){
e
&&
e
()}).
start
()},
a
.
FireworkSettings
=
void
0
;
var
d
=
function
(){
function
t
(
t
,
e
,
a
,
n
,
i
,
o
,
c
){
void
0
===
a
&&
(
a
=
cc
.
v2
(
0
,
0
)),
void
0
===
n
&&
(
n
=
cc
.
v2
(
0
,
100
)),
void
0
===
i
&&
(
i
=
50
),
void
0
===
o
&&
(
o
=
100
),
void
0
===
c
&&
(
c
=
0
),
this
.
baseNode
=
void
0
,
this
.
nodeList
=
void
0
,
this
.
pos
=
void
0
,
this
.
side
=
void
0
,
this
.
range
=
void
0
,
this
.
number
=
void
0
,
this
.
scalseRange
=
void
0
,
this
.
baseNode
=
t
,
this
.
nodeList
=
e
,
this
.
pos
=
a
,
this
.
side
=
n
,
this
.
range
=
i
,
this
.
number
=
o
,
this
.
scalseRange
=
c
}
return
t
.
copy
=
function
(
e
){
return
new
t
(
e
.
baseNode
,
e
.
nodeList
,
e
.
pos
,
e
.
side
,
e
.
range
,
e
.
number
)},
t
}();
function
l
(){
return
u
.
apply
(
this
,
arguments
)}
function
u
(){
return
(
u
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
){
var
a
,
n
,
c
,
r
,
h
,
d
,
l
;
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
a
=
e
.
baseNode
,
n
=
e
.
nodeList
,
c
=
e
.
pos
,
r
=
e
.
side
,
h
=
e
.
range
,
d
=
e
.
number
,
l
=
e
.
scalseRange
,
new
Array
(
d
).
fill
(
"
"
).
forEach
(
function
(){
var
t
=
i
(
regeneratorRuntime
.
mark
(
function
t
(){
var
e
,
i
,
d
,
u
;
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
(
e
=
new
cc
.
Node
).
parent
=
a
,
e
.
x
=
c
.
x
,
e
.
y
=
c
.
y
,
e
.
angle
=
60
*
Math
.
random
()
-
30
,(
i
=
cc
.
instantiate
(
n
[
o
(
n
.
length
)])).
parent
=
e
,
i
.
active
=!
0
,
i
.
x
=
0
,
i
.
y
=
0
,
i
.
angle
=
0
,
i
.
scale
=
(
Math
.
random
()
-
.
5
)
*
l
+
1
,
d
=
Math
.
random
(),
u
=
Math
.
PI
*
(
2
*
Math
.
random
()
-
1
),
t
.
next
=
16
,
m
(
e
,.
3
,{
x
:
r
.
x
*
d
+
Math
.
cos
(
u
)
*
h
*
d
,
y
:
r
.
y
*
d
+
Math
.
sin
(
u
)
*
h
*
d
},{
easing
:
"
quadIn
"
});
case
16
:
return
cc
.
tween
(
e
).
by
(
8
,{
y
:
-
2
e3
}).
start
(),
cc
.
tween
(
e
).
to
(
5
,{
scale
:(
Math
.
random
()
-
.
5
)
*
l
+
1
}).
start
(),
g
(
e
),
t
.
next
=
21
,
s
(
Math
.
random
());
case
21
:
cc
.
tween
(
i
).
by
(.
15
,{
x
:
-
10
,
angle
:
-
10
}).
by
(.
3
,{
x
:
20
,
angle
:
20
}).
by
(.
15
,{
x
:
-
10
,
angle
:
-
10
}).
union
().
repeatForever
().
start
(),
cc
.
tween
(
e
).
delay
(
5
).
to
(.
3
,{
opacity
:
0
}).
call
(
function
(){
i
.
stopAllActions
(),
i
.
active
=!
1
,
i
.
parent
=
null
,
i
=
null
}).
start
();
case
23
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}));
return
function
(
e
,
a
){
return
t
.
apply
(
this
,
arguments
)}}());
case
2
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
function
g
(){
return
p
.
apply
(
this
,
arguments
)}
function
p
(){
return
(
p
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
){
var
a
,
n
;
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
a
=
1
+
Math
.
random
(),
n
=
o
(
-
200
,
200
)
*
a
,
t
.
next
=
4
,
m
(
e
,
a
,{
x
:
n
,
angle
:
60
*
n
/
200
});
case
4
:
g
(
e
);
case
5
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
function
f
(){
return
(
f
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
,
a
,
n
,
i
){
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
void
0
===
i
&&
(
i
=
void
0
),
t
.
abrupt
(
"
return
"
,
new
Promise
(
function
(
t
,
o
){
try
{
cc
.
tween
(
e
).
to
(
a
,
n
,
i
).
call
(
function
(){
t
()}).
start
()}
catch
(
c
){
o
(
c
)}}));
case
2
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
function
m
(){
return
v
.
apply
(
this
,
arguments
)}
function
v
(){
return
(
v
=
i
(
regeneratorRuntime
.
mark
(
function
t
(
e
,
a
,
n
,
i
){
return
regeneratorRuntime
.
wrap
(
function
(
t
){
for
(;;)
switch
(
t
.
prev
=
t
.
next
){
case
0
:
return
void
0
===
i
&&
(
i
=
void
0
),
t
.
abrupt
(
"
return
"
,
new
Promise
(
function
(
t
,
o
){
try
{
cc
.
tween
(
e
).
by
(
a
,
n
,
i
).
call
(
function
(){
t
()}).
start
()}
catch
(
c
){
o
(
c
)}}));
case
2
:
case
"
end
"
:
return
t
.
stop
()}},
t
)}))).
apply
(
this
,
arguments
)}
a
.
FireworkSettings
=
d
,
cc
.
_RF
.
pop
()},{}]},{},[
"
aks_01
"
,
"
util
"
]);
\ 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