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
0ef8c24d
Commit
0ef8c24d
authored
Jul 25, 2022
by
Tt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://vcs.ireadabc.com/template/OP13
into master
parents
08700fca
583091f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
144 additions
and
25 deletions
+144
-25
.DS_Store
.DS_Store
+0
-0
OP13.js
play/assets/OP13/scene/OP13.js
+25
-23
DefaultData.js
play/assets/OP13/script/DefaultData.js
+107
-1
utils.js
play/assets/OP13/script/utils.js
+12
-1
No files found.
.DS_Store
View file @
0ef8c24d
No preview for this file type
play/assets/OP13/scene/OP13.js
View file @
0ef8c24d
const
saveKey
=
"
DataKey_Cocos_FT14
"
;
const
BaseUI
=
require
(
'
BaseUI
'
);
import
{
DefaultData
}
from
'
../script/DefaultData
'
;
import
EventMgr
from
'
../script/EventMgr
'
;
import
VerletRender
from
"
../script/verlet_render
"
;
import
BezierRender
from
"
../script/bezier_render
"
;
import
{
onHomeworkFinish
}
from
"
../script/utils
"
;
const
POS
=
{
LeftPage
:
{
x
:
-
239
,
y
:
-
5
},
RightPage
:
{
x
:
239
,
y
:
-
5
},
...
...
@@ -170,12 +169,16 @@ cc.Class({
let
page
=
this
.
pageList
[
GameData
.
pageIndex
+
1
];
if
(
!
page
)
{
onHomeworkFinish
();
return
resolve
(
''
);
}
GameData
.
isPlaying
=
true
;
let
itemPage
=
page
.
getComponent
(
'
ItemPage
'
);
itemPage
.
playAudio
();
itemPage
.
playSpine
().
then
(()
=>
{
if
(
this
.
pageList
.
length
-
GameData
.
pageIndex
<=
2
)
{
onHomeworkFinish
();
}
resolve
(
''
);
})
});
...
...
@@ -440,8 +443,8 @@ cc.Class({
// })
// let spf2 = spf1;
cc
.
tween
(
page1
)
.
to
(
1
,
{
opacity
:
0
})
.
start
();
.
to
(
1
,
{
opacity
:
0
})
.
start
();
let
page2
=
this
.
pageList
[
GameData
.
pageIndex
-
1
];
if
(
page2
)
{
...
...
@@ -449,39 +452,38 @@ cc.Class({
// spf2 = this.capture.doCapture(page2);
// page2.opacity = 0;
// this.scheduleOnce(() => {
page2
.
x
=
POS
.
RightPage
.
x
;
page2
.
x
=
POS
.
RightPage
.
x
;
// })
if
(
page0
)
{
cc
.
tween
(
page0
)
// .delay(1)
.
to
(
1
,
{
opacity
:
0
})
.
start
();
// .delay(1)
.
to
(
1
,
{
opacity
:
0
})
.
start
();
}
cc
.
tween
(
page2
)
// .delay(1)
.
to
(
1
,
{
opacity
:
255
})
.
to
(
1
,
{
opacity
:
255
})
.
call
(()
=>
{
this
.
resetPages
()
})
.
start
();
.
start
();
}
let
page3
=
this
.
pageList
[
GameData
.
pageIndex
-
2
]
if
(
page3
)
{
// this.scheduleOnce(() => {
page3
.
opacity
=
0
;
page3
.
opacity
=
0
;
// })
cc
.
tween
(
page3
)
// .delay(1)
.
to
(
1
,
{
opacity
:
255
})
// .delay(1)
.
to
(
1
,
{
opacity
:
255
})
.
call
(()
=>
{
})
.
start
();
}
}
// let node = cc.instantiate(this.pfbItemTurnPage2);
...
...
@@ -541,8 +543,8 @@ cc.Class({
// let spf2 = spf1;
cc
.
tween
(
page1
)
.
to
(
1
,
{
opacity
:
0
})
.
to
(
1
,
{
opacity
:
0
})
.
start
();
let
page2
=
this
.
pageList
[
GameData
.
pageIndex
+
2
]
...
...
@@ -551,26 +553,26 @@ cc.Class({
// spf2 = this.capture.doCapture(page2, true);
// page2.opacity = 0;
// this.scheduleOnce(() => {
page2
.
x
=
POS
.
LeftPage
.
x
;
page2
.
x
=
POS
.
LeftPage
.
x
;
// })
cc
.
tween
(
page0
)
// .delay(1)
.
to
(
1
,
{
opacity
:
0
})
.
to
(
1
,
{
opacity
:
0
})
.
start
();
cc
.
tween
(
page2
)
// .delay(1)
.
to
(
1
,
{
opacity
:
255
})
.
to
(
1
,
{
opacity
:
255
})
.
call
(()
=>
{
this
.
resetPages
()
})
.
start
();
.
start
();
}
let
page3
=
this
.
pageList
[
GameData
.
pageIndex
+
3
]
if
(
page3
)
{
// this.scheduleOnce(() => {
page3
.
opacity
=
255
;
page3
.
opacity
=
255
;
// })
}
...
...
play/assets/OP13/script/DefaultData.js
View file @
0ef8c24d
export
const
DefaultData
=
{
"
haveCover
"
:
false
,
"
coverType
"
:
"
Image
"
,
"
coverImage
"
:
""
,
"
coverAudio
"
:
""
,
"
coverText
"
:
""
,
"
coverDragonBone
"
:{
"
skeJsonData
"
:{
"
url
"
:
""
},
"
texJsonData
"
:{
"
url
"
:
""
},
"
texPngData
"
:{
"
url
"
:
""
}},
"
titleAudio
"
:
""
,
"
titleText
"
:
""
,
"
titleTextColor
"
:
"
A
"
,
"
pageList
"
:[{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
https://staging-teach.cdn.ireadabc.com/0e67aa701df18cbb5581ffb81ffa7836.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:{
"
skeJsonData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/fc5185ff366f95b362f0d73538d2e553.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_20(1)_ske.json
"
},
"
texJsonData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/2b2b56ee758ff7cbeb75d7a912262b51.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_20(1)_tex.json
"
},
"
texPngData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/f57f002e14275cf7e5010ed8cd562ad8.png
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_20(1)_tex.png
"
}}},{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
https://staging-teach.cdn.ireadabc.com/4c0379bc0f3bd0722874b2e11fb35336.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:{
"
skeJsonData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/d4d848c9a32e3296cfa1bacb22753ea9.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_22(1)_ske.json
"
},
"
texJsonData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/4c06cdcf08b155ecc47f2236ad6e7cc2.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_22(1)_tex.json
"
},
"
texPngData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/d244e99b4376dc91e069a3f22b965051.png
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_22(1)_tex.png
"
}}},{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
https://staging-teach.cdn.ireadabc.com/fe226bc303f03ea994cb9a93d1620284.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:{
"
skeJsonData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/727efd64e18fe99cdfc78b801c0c93b6.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_24(1)_ske.json
"
},
"
texJsonData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/6997187f2b4a787a48fee73abb90e95d.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_24(1)_tex.json
"
},
"
texPngData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/23eaa25a8c7d6a29c775f3ad6adddbf9.png
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_24(1)_tex.png
"
}}},{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
https://staging-teach.cdn.ireadabc.com/2990d622ec2940841a0741d7b64a3c50.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:{
"
skeJsonData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/11afe1cee9c37fcfe26af6496ddfe21a.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_26(1)_ske.json
"
},
"
texJsonData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/06d1ce99efc8268a582419bde11671b1.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_26(1)_tex.json
"
},
"
texPngData
"
:{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/e315f97f50ed6698dee354c6d5290da5.png
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_26(1)_tex.png
"
}}}]}
\ No newline at end of file
export
const
DefaultData
=
{
"
haveCover
"
:
false
,
"
coverType
"
:
"
Image
"
,
"
coverImage
"
:
""
,
"
coverAudio
"
:
""
,
"
coverText
"
:
""
,
"
coverDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
""
},
"
texJsonData
"
:
{
"
url
"
:
""
},
"
texPngData
"
:
{
"
url
"
:
""
}
},
"
titleAudio
"
:
""
,
"
titleText
"
:
""
,
"
titleTextColor
"
:
"
A
"
,
"
pageList
"
:
[
{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
https://staging-teach.cdn.ireadabc.com/0e67aa701df18cbb5581ffb81ffa7836.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/fc5185ff366f95b362f0d73538d2e553.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_20(1)_ske.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/2b2b56ee758ff7cbeb75d7a912262b51.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_20(1)_tex.json
"
},
"
texPngData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/f57f002e14275cf7e5010ed8cd562ad8.png
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_20(1)_tex.png
"
}
}
},
{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
https://staging-teach.cdn.ireadabc.com/4c0379bc0f3bd0722874b2e11fb35336.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/d4d848c9a32e3296cfa1bacb22753ea9.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_22(1)_ske.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/4c06cdcf08b155ecc47f2236ad6e7cc2.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_22(1)_tex.json
"
},
"
texPngData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/d244e99b4376dc91e069a3f22b965051.png
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_22(1)_tex.png
"
}
}
},
{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
https://staging-teach.cdn.ireadabc.com/fe226bc303f03ea994cb9a93d1620284.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/727efd64e18fe99cdfc78b801c0c93b6.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_24(1)_ske.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/6997187f2b4a787a48fee73abb90e95d.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_24(1)_tex.json
"
},
"
texPngData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/23eaa25a8c7d6a29c775f3ad6adddbf9.png
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_24(1)_tex.png
"
}
}
},
{
"
pageType
"
:
"
Image
"
,
"
pageAudio
"
:
"
https://staging-teach.cdn.ireadabc.com/2990d622ec2940841a0741d7b64a3c50.mp3
"
,
"
pageText
"
:
""
,
"
pageImage
"
:
""
,
"
textColor
"
:
"
A
"
,
"
pageDragonBone
"
:
{
"
skeJsonData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/11afe1cee9c37fcfe26af6496ddfe21a.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_26(1)_ske.json
"
},
"
texJsonData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/06d1ce99efc8268a582419bde11671b1.json
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_26(1)_tex.json
"
},
"
texPngData
"
:
{
"
url
"
:
"
https://staging-teach.cdn.ireadabc.com/e315f97f50ed6698dee354c6d5290da5.png
"
,
"
name
"
:
"
OP_SB1_459612_U1L4_26(1)_tex.png
"
}
}
}
]
}
\ No newline at end of file
play/assets/OP13/script/utils.js
View file @
0ef8c24d
...
...
@@ -196,4 +196,15 @@ async function rabbonFall(node) {
const
offsetX
=
RandomInt
(
-
200
,
200
)
*
time
;
await
asyncTweenBy
(
node
,
time
,
{
x
:
offsetX
,
angle
:
offsetX
*
60
/
200
});
rabbonFall
(
node
);
}
\ No newline at end of file
}
export
function
onHomeworkFinish
()
{
const
middleLayer
=
cc
.
find
(
'
middleLayer
'
);
if
(
middleLayer
)
{
const
middleLayerComponent
=
middleLayer
.
getComponent
(
'
middleLayer
'
);
if
(
middleLayerComponent
.
role
==
'
student
'
)
{
middleLayerComponent
.
onHomeworkFinish
(()
=>
{
});
}
}
else
{
console
.
log
(
'
onHomeworkFinish
'
);
}
}
\ 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