Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_NGT
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_NGT
Commits
ba03f80e
Commit
ba03f80e
authored
Mar 04, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 语音评测时切换下一页
parent
ab9ea14c
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
300 additions
and
139 deletions
+300
-139
middleLayer_for_NGT.fire
assets/middleLayer_for_NGT/scene/middleLayer_for_NGT.fire
+263
-136
middleLayer.js
assets/middleLayer_for_NGT/script/middleLayer.js
+37
-3
No files found.
assets/middleLayer_for_NGT/scene/middleLayer_for_NGT.fire
View file @
ba03f80e
This diff is collapsed.
Click to expand it.
assets/middleLayer_for_NGT/script/middleLayer.js
View file @
ba03f80e
...
...
@@ -80,6 +80,7 @@ cc.Class({
start
()
{
initAir
(
this
);
this
.
reWriteAir
();
this
.
updateWidgets
();
window
.
courseware
.
getEngineInfo
((
dataStr
)
=>
{
const
engineInfo
=
JSON
.
parse
(
dataStr
);
...
...
@@ -397,7 +398,11 @@ cc.Class({
console
.
log
(
"
sceneName =
"
+
conf
.
sceneName
);
const
canvas
=
cc
.
find
(
"
Canvas
"
);
const
middleLayer
=
cc
.
find
(
"
middleLayer
"
);
window
.
courseware
.
freeAllOcMethod
();
this
.
hideWaitingLetters
();
this
.
updateWidgets
();
callback
&&
callback
();
});
});
...
...
@@ -420,6 +425,35 @@ cc.Class({
this
.
loadBundleByConf
(
this
.
bundleInfoList
[
this
.
currentBundleIndex
]);
},
updateWidgets
()
{
this
.
updateScale
();
this
.
node
.
getComponentsInChildren
(
cc
.
Widget
).
forEach
((
widget
)
=>
{
widget
.
updateAlignment
();
});
},
updateScale
()
{
// const canvas = cc.find("Canvas");
// const canvasSize = cc.view.getCanvasSize();
// const designSize = cc.view.getDesignResolutionSize();
// const scale =
// canvas.width / canvasSize.width / (canvas.height / canvasSize.height);
// console.log("canvasSize:", canvasSize);
// console.log("designSize:", designSize);
// console.log({ x: canvas.x, y: canvas.y });
// console.log({ width: canvas.width, height: canvas.height });
// console.log('scale = ' + scale);
// this.node.width = canvas.width;
// this.node.height = canvas.height * scale;
// this.node.x = this.node.width / 2;
// this.node.y = this.node.height / 2 - 120;
},
exit
()
{
cc
.
game
.
removePersistRootNode
(
this
.
node
);
...
...
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