Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_iplayabc
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
middleLayer_for_iplayabc
Commits
c81ebe40
Commit
c81ebe40
authored
Nov 13, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 单词闭环
parent
aa24e641
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
304 additions
and
8 deletions
+304
-8
middleLayer_for_iplayabc.fire
...dleLayer_for_iplayabc/scene/middleLayer_for_iplayabc.fire
+200
-2
middleLayer.js
assets/middleLayer_for_iplayabc/script/middleLayer.js
+32
-6
book.png
assets/middleLayer_for_iplayabc/textures/book.png
+0
-0
book.png.meta
assets/middleLayer_for_iplayabc/textures/book.png.meta
+36
-0
book_white.png
assets/middleLayer_for_iplayabc/textures/book_white.png
+0
-0
book_white.png.meta
assets/middleLayer_for_iplayabc/textures/book_white.png.meta
+36
-0
No files found.
assets/middleLayer_for_iplayabc/scene/middleLayer_for_iplayabc.fire
View file @
c81ebe40
...
@@ -284,15 +284,18 @@
...
@@ -284,15 +284,18 @@
"_children": [
"_children": [
{
{
"__id__": 8
"__id__": 8
},
{
"__id__": 10
}
}
],
],
"_active": true,
"_active": true,
"_components": [
"_components": [
{
{
"__id__": 1
0
"__id__": 1
4
},
},
{
{
"__id__": 1
1
"__id__": 1
5
}
}
],
],
"_prefab": null,
"_prefab": null,
...
@@ -437,6 +440,201 @@
...
@@ -437,6 +440,201 @@
"_N$affectedByScale": false,
"_N$affectedByScale": false,
"_id": "f8moL2AXVNK5F4ZX+EkYD6"
"_id": "f8moL2AXVNK5F4ZX+EkYD6"
},
},
{
"__type__": "cc.Node",
"_name": "book",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 11
},
{
"__id__": 12
},
{
"__id__": 13
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 80,
"height": 80
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
600,
320,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "a5VVILtfpGdqCZzPjCsmvT"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "c01dd03d-69ce-4da7-84db-34b6f51404b5"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_atlas": null,
"_id": "ddLnJiHM5Nla+LLHV3cEP1"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "87s6eS8tlDTLzPLD+C19aV"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 10
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "fckG5y6TBMhpDO722n5p1+"
},
{
{
"__type__": "cc.Widget",
"__type__": "cc.Widget",
"_name": "",
"_name": "",
...
...
assets/middleLayer_for_iplayabc/script/middleLayer.js
View file @
c81ebe40
...
@@ -101,14 +101,19 @@ cc.Class({
...
@@ -101,14 +101,19 @@ cc.Class({
engineCode
:
null
,
// 机器唯一编码
engineCode
:
null
,
// 机器唯一编码
currentSceneName
:
null
,
// 当前模板名称
currentSceneName
:
null
,
// 当前模板名称
canTouch
:
null
,
// 统一释放异步资源的方法
// 统一释放异步资源的方法
onLoad
()
{
async
onLoad
()
{
this
.
preloadCount
=
0
;
this
.
preloadCount
=
0
;
this
.
loadedCount
=
0
;
this
.
loadedCount
=
0
;
initAir
(
this
);
initAir
(
this
);
this
.
reWriteAir
();
this
.
reWriteAir
();
await
this
.
getBaseUrl
();
this
.
canTouch
=
true
;
},
},
start
()
{
start
()
{
...
@@ -120,18 +125,39 @@ cc.Class({
...
@@ -120,18 +125,39 @@ cc.Class({
this
.
showWaitingLetters
();
this
.
showWaitingLetters
();
// this.onMiddleLayerLoadingFinish();
// this.onMiddleLayerLoadingFinish();
this
.
loadOnlineBundle
(
"
wordgame_syllabus
"
);
const
words
=
cc
.
sys
.
localStorage
.
getItem
(
"
words
"
);
if
(
words
)
{
this
.
loadOnlineBundle
(
"
wordgame_learning
"
);
}
else
{
this
.
loadOnlineBundle
(
"
wordgame_syllabus
"
);
}
},
},
initListener
()
{
initListener
()
{
cc
.
find
(
`middleLayer/book`
).
on
(
'
click
'
,
()
=>
{
if
(
!
this
.
canTouch
)
{
return
;
}
this
.
canTouch
=
false
;
this
.
showWaitingLetters
();
cc
.
audioEngine
.
stopAll
();
this
.
loadOnlineBundle
(
"
wordgame_syllabus
"
);
setTimeout
(()
=>
{
this
.
canTouch
=
true
;
},
200
);
});
},
saveAnswer
(
data
)
{
console
.
log
(
'
-----------------
'
);
console
.
log
(
data
);
console
.
log
(
'
-----------------
'
);
},
},
reWriteAir
()
{
reWriteAir
()
{
window
.
courseware
.
getData
=
async
(
callback
)
=>
{
window
.
courseware
.
getData
=
async
(
callback
)
=>
{
const
data
=
await
this
.
callNetworkApiGet
(
"
/v1/preference/words
"
,
{
user_code
:
this
.
engineCode
});
const
data
=
await
this
.
callNetworkApiGet
(
"
/v1/preference/words
"
,
{
user_code
:
this
.
engineCode
});
callback
&&
callback
(
data
.
rows
);
callback
&&
callback
(
data
);
}
}
if
(
!
window
.
air
)
{
if
(
!
window
.
air
)
{
window
.
air
=
{};
window
.
air
=
{};
...
...
assets/middleLayer_for_iplayabc/textures/book.png
0 → 100644
View file @
c81ebe40
6.9 KB
assets/middleLayer_for_iplayabc/textures/book.png.meta
0 → 100644
View file @
c81ebe40
{
"ver": "2.3.5",
"uuid": "088248b9-cd77-4afe-a403-abb82e48789f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 200,
"height": 200,
"platformSettings": {},
"subMetas": {
"book": {
"ver": "1.0.4",
"uuid": "c01dd03d-69ce-4da7-84db-34b6f51404b5",
"rawTextureUuid": "088248b9-cd77-4afe-a403-abb82e48789f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 2,
"offsetY": 0,
"trimX": 14,
"trimY": 37,
"width": 176,
"height": 126,
"rawWidth": 200,
"rawHeight": 200,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
assets/middleLayer_for_iplayabc/textures/book_white.png
0 → 100644
View file @
c81ebe40
7.18 KB
assets/middleLayer_for_iplayabc/textures/book_white.png.meta
0 → 100644
View file @
c81ebe40
{
"ver": "2.3.5",
"uuid": "6d1b5ca3-e0e9-4d8e-b787-31d20ff87daa",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 200,
"height": 200,
"platformSettings": {},
"subMetas": {
"book_white": {
"ver": "1.0.4",
"uuid": "98605b15-db62-4006-8a89-65ac6dbe3115",
"rawTextureUuid": "6d1b5ca3-e0e9-4d8e-b787-31d20ff87daa",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 2,
"offsetY": 0,
"trimX": 14,
"trimY": 37,
"width": 176,
"height": 126,
"rawWidth": 200,
"rawHeight": 200,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ 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