Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_debug
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_debug
Commits
e2e55651
Commit
e2e55651
authored
Mar 16, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat
parent
32168b70
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
17 deletions
+32
-17
middleLayer_for_debug.fire
...ts/middleLayer_for_debug/scene/middleLayer_for_debug.fire
+6
-6
air.js
assets/middleLayer_for_debug/script/air.js
+1
-1
middleLayer.ts
assets/middleLayer_for_debug/script/middleLayer.ts
+25
-10
No files found.
assets/middleLayer_for_debug/scene/middleLayer_for_debug.fire
View file @
e2e55651
...
...
@@ -4215,7 +4215,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
2
00,
"width":
1
00,
"height": 40
},
"_anchorPoint": {
...
...
@@ -4227,7 +4227,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
5
58.374
,
5
97.216
,
-218.593,
0,
0,
...
...
@@ -4284,7 +4284,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
2
00,
"width":
1
00,
"height": 40
},
"_anchorPoint": {
...
...
@@ -4346,7 +4346,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width":
2
00,
"width":
1
00,
"height": 40
},
"_anchorPoint": {
...
...
@@ -4398,8 +4398,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "
获取设备信息
",
"_N$string": "
获取设备信息
",
"_string": "
预加载
",
"_N$string": "
预加载
",
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": false,
...
...
assets/middleLayer_for_debug/script/air.js
View file @
e2e55651
...
...
@@ -344,7 +344,7 @@ export function initAir(_this) {
}
else
{
console
.
error
(
`非源生环境,网页版不支持
${
method
}
方法,将返回此方法的Mock数据以便于网页版调试使用`
);
if
(
method
==
'
getEngineInfo
'
){
window
.
air
.
getEngineInfoCallback
({
isDev
:
1
,
uuid
:
'
debug-xxxxxx-xxxxxx
'
});
window
.
air
.
getEngineInfoCallback
({
isDev
:
0
,
uuid
:
'
debug-xxxxxx-xxxxxx
'
});
}
else
if
(
method
==
'
startTest
'
)
{
}
else
if
(
method
==
'
stopTest
'
)
{
window
.
air
.
testCallBack
(
testMockData
);
...
...
assets/middleLayer_for_debug/script/middleLayer.ts
View file @
e2e55651
...
...
@@ -142,6 +142,20 @@ export default class NewClass extends middleLayerBase {
});
}
preloadOxfordScene
()
{
// 测试用
cc
.
find
(
"
middleLayer/ui/ProgressLabel
"
).
active
=
true
;
cc
.
find
(
'
middleLayer/ui/loadingProgress
'
).
active
=
true
;
this
.
callNetworkApiGet
(
`/api/syllabus/v1/allbundles`
,
{
orgid
:
512
,
platform
:
"
web_desktop
"
},
(
datastr
)
=>
{
const
data
=
JSON
.
parse
(
datastr
);
if
(
data
.
rows
&&
data
.
rows
.
length
>
0
)
{
this
.
preloadCount
+=
data
.
rows
.
length
;
}
this
.
log
(
'
data.rows =
'
+
JSON
.
stringify
(
data
.
rows
));
this
.
batchPreloadScene
(
data
.
rows
);
});
}
batchPreloadScene
(
scenes
=
[])
{
const
expects
=
[
// 'op_03_2',
...
...
@@ -634,19 +648,20 @@ export default class NewClass extends middleLayerBase {
BtnLoad
.
on
(
'
click
'
,
()
=>
{
// 测试获取设备信息
(
<
any
>
window
).
courseware
.
getEngineInfo
(
res
=>
{
this
.
log
(
'
--------getEngineInfo返回结果---------
'
);
this
.
log
(
res
)
this
.
log
(
'
------------------------------
'
);
});
//
(<any>window).courseware.getEngineInfo(res => {
//
this.log('--------getEngineInfo返回结果---------');
//
this.log(res)
//
this.log('------------------------------');
//
});
// 测试预加载资源
//
this.preloadCount = 0;
//
this.loadedCount = 0;
//
cc.find("middleLayer/ui/ProgressLabel").active = true;
//
cc.find('middleLayer/ui/loadingProgress').active = true;
//
//
this.preloadAll();
this
.
preloadCount
=
0
;
this
.
loadedCount
=
0
;
cc
.
find
(
"
middleLayer/ui/ProgressLabel
"
).
active
=
true
;
cc
.
find
(
'
middleLayer/ui/loadingProgress
'
).
active
=
true
;
// this.preloadAll();
// this.preloadSourceImman();
this
.
preloadOxfordScene
();
});
const
btnClose
=
cc
.
find
(
'
middleLayer/ConsoleNode/BtnClose
'
);
...
...
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