Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OP13
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
OP13
Commits
40baf6fd
Commit
40baf6fd
authored
Aug 16, 2022
by
Tt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
滑动改按钮
parent
8fdda601
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
213 additions
and
65 deletions
+213
-65
OP13.fire
play/assets/OP13/scene/OP13.fire
+206
-54
OP13.js
play/assets/OP13/scene/OP13.js
+7
-11
No files found.
play/assets/OP13/scene/OP13.fire
View file @
40baf6fd
This diff is collapsed.
Click to expand it.
play/assets/OP13/scene/OP13.js
View file @
40baf6fd
...
@@ -19,6 +19,8 @@ cc.Class({
...
@@ -19,6 +19,8 @@ cc.Class({
pfbItemTurnPage2
:
cc
.
Prefab
,
pfbItemTurnPage2
:
cc
.
Prefab
,
tipFirst
:
cc
.
Node
,
tipFirst
:
cc
.
Node
,
tipLast
:
cc
.
Node
,
tipLast
:
cc
.
Node
,
btnLeft
:
cc
.
Node
,
btnRight
:
cc
.
Node
,
// verletRender: VerletRender,
// verletRender: VerletRender,
capture
:
require
(
'
capture_to_web
'
),
capture
:
require
(
'
capture_to_web
'
),
},
},
...
@@ -87,7 +89,7 @@ cc.Class({
...
@@ -87,7 +89,7 @@ cc.Class({
let
data
=
DefaultData
;
let
data
=
DefaultData
;
// return data;
// return data;
return
{
"
haveCover
"
:
false
,
"
coverType
"
:
"
Image
"
,
"
coverImage
"
:
""
,
"
coverAudio
"
:
""
,
"
coverText
"
:
""
,
"
coverDragonBone
"
:{
"
skeJsonData
"
:{
"
url
"
:
""
},
"
texJsonData
"
:{
"
url
"
:
""
},
"
texPngData
"
:{
"
url
"
:
""
}},
"
titleAudio
"
:
""
,
"
titleText
"
:
""
,
"
titleTextColor
"
:
"
A
"
,
"
pageList
"
:[{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/cc5b1a8730bc275ecac85185d5ce2c5b.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:{
"
skeJsonData
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/679fed26daa464819d553de6331b3552.json
"
,
"
name
"
:
"
alien-pro.json
"
},
"
texJsonData
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/65d8214c6b5c5d0496e17adb0408276a.atlas
"
,
"
name
"
:
"
alien-pro.atlas
"
},
"
texPngData
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/a319b372899239325b90bb4ec07b4970.png
"
,
"
name
"
:
"
alien-pro.png
"
},
"
animType
"
:
"
spine
"
}},{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/fd877ad376fdffdb0dfc62122065a78f.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:{
"
skeJsonData
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/d1f859d3fba84bd03565e543c986fb28.json
"
,
"
name
"
:
"
6_4_ske.json
"
},
"
texJsonData
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/70f96e1cc7f013e27ed1952c503fb750.json
"
,
"
name
"
:
"
6_4_tex.json
"
},
"
texPngData
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/b06f9b90018a6eb0175a01e355b9ced6.png
"
,
"
name
"
:
"
6_4_tex.png
"
},
"
animType
"
:
"
dragonBone
"
}},{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/dff6748c93f6bf3de8cb7105fa9ba5de.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:{
"
skeJsonData
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/a278a56fe77dfade7366829e9c65c815.json
"
,
"
name
"
:
"
6_3_ske.json
"
},
"
texJsonData
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/96680527a570cec4d7c9818c91ec434a.json
"
,
"
name
"
:
"
6_3_tex.json
"
},
"
texPngData
"
:{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/5c441810b0a5bc73248c50d8c32b4899.png
"
,
"
name
"
:
"
6_3_tex.png
"
},
"
animType
"
:
"
dragonBone
"
}}]
}
return
{
"
haveCover
"
:
false
,
"
coverType
"
:
"
Image
"
,
"
coverImage
"
:
""
,
"
coverAudio
"
:
""
,
"
coverText
"
:
""
,
"
coverDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
""
},
"
texJsonData
"
:
{
"
url
"
:
""
},
"
texPngData
"
:
{
"
url
"
:
""
}
},
"
titleAudio
"
:
""
,
"
titleText
"
:
""
,
"
titleTextColor
"
:
"
A
"
,
"
pageList
"
:
[{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/cc5b1a8730bc275ecac85185d5ce2c5b.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/679fed26daa464819d553de6331b3552.json
"
,
"
name
"
:
"
alien-pro.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/65d8214c6b5c5d0496e17adb0408276a.atlas
"
,
"
name
"
:
"
alien-pro.atlas
"
},
"
texPngData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/a319b372899239325b90bb4ec07b4970.png
"
,
"
name
"
:
"
alien-pro.png
"
},
"
animType
"
:
"
spine
"
}
},
{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/fd877ad376fdffdb0dfc62122065a78f.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/d1f859d3fba84bd03565e543c986fb28.json
"
,
"
name
"
:
"
6_4_ske.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/70f96e1cc7f013e27ed1952c503fb750.json
"
,
"
name
"
:
"
6_4_tex.json
"
},
"
texPngData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/b06f9b90018a6eb0175a01e355b9ced6.png
"
,
"
name
"
:
"
6_4_tex.png
"
},
"
animType
"
:
"
dragonBone
"
}
},
{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
http://staging-teach.cdn.ireadabc.com/dff6748c93f6bf3de8cb7105fa9ba5de.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/a278a56fe77dfade7366829e9c65c815.json
"
,
"
name
"
:
"
6_3_ske.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/96680527a570cec4d7c9818c91ec434a.json
"
,
"
name
"
:
"
6_3_tex.json
"
},
"
texPngData
"
:
{
"
url
"
:
"
http://staging-teach.cdn.ireadabc.com/5c441810b0a5bc73248c50d8c32b4899.png
"
,
"
name
"
:
"
6_3_tex.png
"
},
"
animType
"
:
"
dragonBone
"
}
}]
}
},
},
preloadItem
()
{
preloadItem
()
{
...
@@ -178,7 +180,7 @@ cc.Class({
...
@@ -178,7 +180,7 @@ cc.Class({
let
itemPage
=
page
.
getComponent
(
'
ItemPage
'
);
let
itemPage
=
page
.
getComponent
(
'
ItemPage
'
);
itemPage
.
playAudio
();
itemPage
.
playAudio
();
itemPage
.
playSpine
().
then
(()
=>
{
itemPage
.
playSpine
().
then
(()
=>
{
if
(
this
.
pageList
.
length
-
GameData
.
pageIndex
<=
2
)
{
if
(
this
.
pageList
.
length
-
GameData
.
pageIndex
<=
2
)
{
onHomeworkFinish
();
onHomeworkFinish
();
}
}
resolve
(
''
);
resolve
(
''
);
...
@@ -194,6 +196,7 @@ cc.Class({
...
@@ -194,6 +196,7 @@ cc.Class({
initEvent
()
{
initEvent
()
{
// this.touchPanel._touchListener && this.touchPanel._touchListener.setSwallowTouches(false);
// this.touchPanel._touchListener && this.touchPanel._touchListener.setSwallowTouches(false);
// this.touchPanel._touchListener.swallowTouches = false;
// this.touchPanel._touchListener.swallowTouches = false;
this
.
touchPanel
.
active
=
false
;
this
.
touchPanel
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onTouchPanel
,
this
)
this
.
touchPanel
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onTouchPanel
,
this
)
},
},
cons
(
data
)
{
cons
(
data
)
{
...
@@ -215,22 +218,15 @@ cc.Class({
...
@@ -215,22 +218,15 @@ cc.Class({
const
lastBtn
=
this
.
lastBtn
=
cc
.
find
(
"
Canvas/left_arrow
"
);
const
lastBtn
=
this
.
lastBtn
=
cc
.
find
(
"
Canvas/left_arrow
"
);
const
nextBtn
=
this
.
nextBtn
=
cc
.
find
(
"
Canvas/right_arrow
"
);
const
nextBtn
=
this
.
nextBtn
=
cc
.
find
(
"
Canvas/right_arrow
"
);
lastBtn
.
on
(
"
touchstart
"
,
()
=>
{
lastBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onTouchPanelLeft
,
this
)
const
isSuccess
=
this
.
onTouchPanelLeft
();
isSuccess
&&
jelly
(
lastBtn
);
})
nextBtn
.
on
(
"
touchstart
"
,
()
=>
{
nextBtn
.
on
(
cc
.
Node
.
EventType
.
TOUCH_END
,
this
.
onTouchPanelRight
,
this
)
const
isSuccess
=
this
.
onTouchPanelRight
();
isSuccess
&&
jelly
(
nextBtn
);
})
},
},
checkShowArrowBtn
()
{
checkShowArrowBtn
()
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
lastBtn
.
active
=
!
this
.
nodeDict
.
btnLast
.
children
[
1
].
active
;
this
.
lastBtn
.
active
=
!
this
.
nodeDict
.
btnLast
.
children
[
1
].
active
;
this
.
nextBtn
.
active
=
!
this
.
nodeDict
.
btnNext
.
children
[
1
].
active
;
this
.
nextBtn
.
active
=
!
this
.
nodeDict
.
btnNext
.
children
[
1
].
active
;
},
220
);
},
220
);
},
},
autoPlay
()
{
autoPlay
()
{
//自动开始播放动画,及触发动画效果
//自动开始播放动画,及触发动画效果
...
...
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