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
e063f0d2
Commit
e063f0d2
authored
Mar 10, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
b6d592b8
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
312 additions
and
17 deletions
+312
-17
middleLayer_for_iplayabc.fire
...dleLayer_for_iplayabc/scene/middleLayer_for_iplayabc.fire
+204
-6
air.js
assets/middleLayer_for_iplayabc/script/air.js
+51
-2
middleLayer.js
assets/middleLayer_for_iplayabc/script/middleLayer.js
+12
-0
book.png
assets/middleLayer_for_iplayabc/textures/book.png
+0
-0
book.png.meta
assets/middleLayer_for_iplayabc/textures/book.png.meta
+9
-9
game.png
assets/middleLayer_for_iplayabc/textures/game.png
+0
-0
game.png.meta
assets/middleLayer_for_iplayabc/textures/game.png.meta
+36
-0
No files found.
assets/middleLayer_for_iplayabc/scene/middleLayer_for_iplayabc.fire
View file @
e063f0d2
...
...
@@ -287,15 +287,18 @@
},
{
"__id__": 14
},
{
"__id__": 18
}
],
"_active": true,
"_components": [
{
"__id__":
18
"__id__":
22
},
{
"__id__":
19
"__id__":
23
}
],
"_prefab": null,
...
...
@@ -599,8 +602,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
8
0,
"height":
8
0
"width":
4
0,
"height":
4
0
},
"_anchorPoint": {
"__type__": "cc.Vec2",
...
...
@@ -680,8 +683,8 @@
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right": 0,
"_top": 0,
"_right":
2
0,
"_top":
2
0,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
...
...
@@ -763,6 +766,201 @@
"_N$target": null,
"_id": "fckG5y6TBMhpDO722n5p1+"
},
{
"__type__": "cc.Node",
"_name": "game",
"_objFlags": 0,
"_parent": {
"__id__": 7
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 19
},
{
"__id__": 20
},
{
"__id__": 21
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 40,
"height": 40
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
539.421,
319.158,
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": "9aYRqZTgtKj7nzmG03k1mJ"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "e3cb2959-dd65-4a0a-8759-3948fbac987a"
},
"_type": 0,
"_sizeMode": 0,
"_fillType": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": false,
"_atlas": null,
"_id": "e9prHzn/NHlb2f95scg4AW"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 33,
"_left": 0,
"_right": 80.57900000000001,
"_top": 20.841999999999985,
"_bottom": 0,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "9eexLjJrFMFqxey0PyiDh9"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 18
},
"_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": "a6bJ+Nla1EjIMfhadFdnSw"
},
{
"__type__": "cc.Widget",
"_name": "",
...
...
assets/middleLayer_for_iplayabc/script/air.js
View file @
e063f0d2
...
...
@@ -13,6 +13,9 @@ export function initAir(_this) {
_this
.
log
(
"
***成功调用onCourseInScreen***
"
);
});
},
recordRealtimeCallBack
:
function
(
res
)
{
_this
.
log
(
`***成功调用recordRealtimeCallBack***参数==
${
res
}
`
);
},
osmoCallback
:
function
(
res
)
{
_this
.
log
(
`***成功调用osmoCallback***参数==
${
res
}
`
);
},
...
...
@@ -25,12 +28,16 @@ export function initAir(_this) {
osmoFingerReadCallback
:
function
(
res
)
{
_this
.
log
(
`***成功调用osmoFingerReadCallback***参数==
${
res
}
`
);
},
dialogStatus
:
function
(
res
)
{
_this
.
log
(
`***成功调用dialogStatus***参数==
${
res
}
`
);
},
startScanCodeCallback
:
null
,
needUpdateCallback
:
null
,
getEngineInfoCallback
:
null
,
takePictureCallBack
:
null
,
configurationPortraitCallback
:
null
,
configurationLandscapeCallback
:
null
,
startBuyToAppStoreCallBack
:
null
,
recognitionCameraCallBack
:
null
,
testCallBack
:
null
,
recordCallBack
:
null
,
...
...
@@ -40,7 +47,7 @@ export function initAir(_this) {
window
.
air
=
new
Proxy
(
realAir
,
{
set
:
function
(
target
,
key
,
value
,
receiver
)
{
let
newValue
=
value
;
if
(
key
==
"
osmoCallback
"
||
key
==
"
osmoHandwritingCallback
"
||
key
==
"
osmoHandwritingMlkitCallback
"
||
key
==
"
osmoFingerReadCallback
"
)
{
if
(
key
==
"
recordRealtimeCallBack
"
||
key
==
"
osmoCallback
"
||
key
==
"
osmoHandwritingCallback
"
||
key
==
"
osmoHandwritingMlkitCallback
"
||
key
==
"
osmoFingerReadCallback
"
)
{
newValue
=
function
(
res
)
{
_this
.
log
(
`||==成功调用
${
key
}
==||参数==
${
JSON
.
stringify
(
res
)}
`
);
if
(
typeof
(
res
)
==
'
string
'
)
{
...
...
@@ -149,15 +156,40 @@ export function initAir(_this) {
window
.
air
.
testCallBack
=
(
res
)
=>
{
res
=
typeof
(
res
)
==
'
string
'
?
res
:
JSON
.
stringify
(
res
);
_this
.
log
(
`===成功调用testCallBack=== res ==
${
res
}
`
);
// 录音异常兼容处理
const
resObj
=
JSON
.
parse
(
res
);
if
(
resObj
.
errCode
)
{
resObj
.
result
=
{
overall
:
0
};
resObj
.
audioUrl
=
""
;
res
=
JSON
.
stringify
(
resObj
);
console
.
log
(
`评测服务信号弱,可能会造成评分不准确,请稍后再来录音评测吧~`
);
}
callback
&&
callback
(
res
);
window
.
air
.
testCallBack
=
null
;
};
window
.
courseware
.
callOcMethod
(
"
stopTest
"
,
{});
},
startRealtimeRecord
(
params
=
{})
{
window
.
courseware
.
hasCalledRealtimeRecord
=
true
;
_this
.
log
(
`===成功调用startRealtimeRecord===
${
JSON
.
stringify
(
params
)}
`
);
window
.
courseware
.
callOcMethod
(
"
startRealtimeRecord
"
,
params
);
},
stopRealtimeRecord
(
params
=
{})
{
window
.
courseware
.
hasCalledRealtimeRecord
=
false
;
_this
.
log
(
`===成功调用stopRealtimeRecord===`
);
window
.
courseware
.
callOcMethod
(
"
stopRealtimeRecord
"
,
params
);
},
// 拍照
takePicture
(
callback
)
{
_this
.
log
(
`===成功调用takePicture===`
);
window
.
air
.
takePictureCallBack
=
(
res
)
=>
{
callback
&&
callback
(
JSON
.
stringify
(
res
));
if
(
typeof
(
res
)
==
'
string
'
)
{
callback
&&
callback
(
res
);
}
else
{
callback
&&
callback
(
JSON
.
stringify
(
res
));
}
window
.
air
.
takePictureCallBack
=
null
;
};
window
.
courseware
.
callOcMethod
(
"
takePicture
"
,
{});
...
...
@@ -191,6 +223,10 @@ export function initAir(_this) {
};
window
.
courseware
.
callOcMethod
(
"
getEngineInfo
"
,
{});
},
exitApp
()
{
_this
.
log
(
`===成功调用exitApp===`
);
window
.
courseware
.
callOcMethod
(
"
exitApp
"
,
{});
},
changeHost
()
{
_this
.
log
(
`===成功调用changeHost===`
);
// 调用原生获取机器信息
...
...
@@ -273,6 +309,14 @@ export function initAir(_this) {
};
window
.
courseware
.
callOcMethod
(
"
onConfigurationLandscape
"
,
params
);
},
startBuyToAppStore
(
params
=
{},
callback
)
{
// 苹果支付
_this
.
log
(
`===成功调用startBuyToAppStore===`
);
window
.
air
.
startBuyToAppStoreCallBack
=
(
res
)
=>
{
callback
&&
callback
(
res
);
};
window
.
courseware
.
callOcMethod
(
"
startBuyToAppStore
"
,
params
);
},
callOcMethod
(
method
,
param
)
{
const
paramStr
=
JSON
.
stringify
(
param
);
_this
.
log
(
`===成功调用原生方法
${
method
}
===参数==
${
paramStr
}
`
);
...
...
@@ -292,6 +336,8 @@ export function initAir(_this) {
}
else
if
(
method
==
'
startRecord
'
)
{
}
else
if
(
method
==
'
stopRecord
'
)
{
window
.
air
.
recordCallBack
(
recordMockData
);
}
else
if
(
method
==
'
startBuyToAppStore
'
)
{
window
.
air
.
startBuyToAppStoreCallBack
({
productid
:
1
,
puid
:
22
,
receiptData
:
"
HelloWorld
"
,
error
:
""
});
}
else
{
console
.
error
(
`
${
method
}
方法还没有Mock数据,请联系技术支持人员添加`
);
}
...
...
@@ -304,6 +350,9 @@ export function initAir(_this) {
if
(
window
.
courseware
.
hasCalledStartTest
)
{
window
.
courseware
.
stopTest
();
}
if
(
window
.
courseware
.
hasCalledRealtimeRecord
)
{
window
.
courseware
.
stopRealtimeRecord
();
}
if
(
window
.
courseware
.
hasCalledOpenRecognitionCamera
)
{
window
.
courseware
.
closeRecognitionCamera
();
}
...
...
assets/middleLayer_for_iplayabc/script/middleLayer.js
View file @
e063f0d2
...
...
@@ -146,6 +146,18 @@ cc.Class({
this
.
canTouch
=
true
;
},
200
);
});
cc
.
find
(
`middleLayer/game`
).
on
(
'
click
'
,
()
=>
{
if
(
!
this
.
canTouch
)
{
return
;
}
this
.
canTouch
=
false
;
this
.
showWaitingLetters
();
cc
.
audioEngine
.
stopAll
();
this
.
loadOnlineBundle
(
"
wordgame_playing
"
);
setTimeout
(()
=>
{
this
.
canTouch
=
true
;
},
200
);
});
},
async
saveAnswer
(
data
)
{
...
...
assets/middleLayer_for_iplayabc/textures/book.png
View replaced file @
b6d592b8
View file @
e063f0d2
6.9 KB
|
W:
|
H:
3.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/middleLayer_for_iplayabc/textures/book.png.meta
View file @
e063f0d2
...
...
@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width":
200
,
"height":
200
,
"width":
128
,
"height":
128
,
"platformSettings": {},
"subMetas": {
"book": {
...
...
@@ -18,14 +18,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX":
2
,
"offsetX":
0
,
"offsetY": 0,
"trimX":
14
,
"trimY":
37
,
"width": 1
76
,
"height": 1
26
,
"rawWidth":
200
,
"rawHeight":
200
,
"trimX":
8
,
"trimY":
8
,
"width": 1
12
,
"height": 1
12
,
"rawWidth":
128
,
"rawHeight":
128
,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
...
...
assets/middleLayer_for_iplayabc/textures/game.png
0 → 100644
View file @
e063f0d2
3.41 KB
assets/middleLayer_for_iplayabc/textures/game.png.meta
0 → 100644
View file @
e063f0d2
{
"ver": "2.3.5",
"uuid": "51675b55-379e-4eb0-b0dd-58c4a700cae2",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 128,
"height": 128,
"platformSettings": {},
"subMetas": {
"game": {
"ver": "1.0.4",
"uuid": "e3cb2959-dd65-4a0a-8759-3948fbac987a",
"rawTextureUuid": "51675b55-379e-4eb0-b0dd-58c4a700cae2",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 128,
"height": 128,
"rawWidth": 128,
"rawHeight": 128,
"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