Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_DG
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_DG
Commits
e417d2cc
Commit
e417d2cc
authored
Jul 10, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 完成
parent
2a7dd682
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
537 additions
and
2 deletions
+537
-2
middleLayer_for_DG.fire
assets/middleLayer_for_DG/scene/middleLayer_for_DG.fire
+513
-2
middleLayer.ts
assets/middleLayer_for_DG/script/middleLayer.ts
+21
-0
middleLayerBase.ts
assets/middleLayer_for_DG/script/middleLayerBase.ts
+3
-0
No files found.
assets/middleLayer_for_DG/scene/middleLayer_for_DG.fire
View file @
e417d2cc
This diff is collapsed.
Click to expand it.
assets/middleLayer_for_DG/script/middleLayer.ts
View file @
e417d2cc
...
...
@@ -25,6 +25,18 @@ export default class NewClass extends middleLayerBase {
})
.
start
();
}
onCourseWareLoaded
()
{
// 课件加载完成的钩子
const
process
=
cc
.
find
(
`middleLayer/pageProgress`
);
const
bar
=
cc
.
find
(
`bar`
,
process
);
const
barWidth
=
process
.
width
*
1
/
this
.
courses
.
length
;
cc
.
tween
(
bar
).
to
(
0.5
,
{
width
:
barWidth
}).
start
();
const
page
=
cc
.
find
(
`page`
,
process
);
page
.
getComponent
(
cc
.
Label
).
string
=
`
${
this
.
courseIndex
+
1
}
/
${
this
.
courses
.
length
}
`
;
}
// 需要预加载的数量
preloadCount
=
null
;
// 统计已加载的数量
...
...
@@ -182,6 +194,15 @@ export default class NewClass extends middleLayerBase {
onHomeworkFinish
(
callBack
,
data
=
null
)
{
this
.
goNextPage
();
const
process
=
cc
.
find
(
`middleLayer/pageProgress`
);
const
bar
=
cc
.
find
(
`bar`
,
process
);
let
barWidth
=
process
.
width
/
this
.
courses
.
length
*
(
this
.
courseIndex
+
1
);
barWidth
=
barWidth
>
process
.
width
?
process
.
width
:
barWidth
;
cc
.
tween
(
bar
).
to
(
0.5
,
{
width
:
barWidth
}).
start
();
const
page
=
cc
.
find
(
`page`
,
process
);
page
.
getComponent
(
cc
.
Label
).
string
=
`
${
this
.
courseIndex
+
1
}
/
${
this
.
courses
.
length
}
`
;
}
localMode
=
false
;
...
...
assets/middleLayer_for_DG/script/middleLayerBase.ts
View file @
e417d2cc
...
...
@@ -6,6 +6,8 @@ export abstract class middleLayerBase extends cc.Component {
abstract
hideWaitingLetters
():
void
;
abstract
showWaitingLetters
():
void
;
onCourseWareLoaded
()
{}
callNetworkApiPost
(
uri
,
data
,
callBack
)
{
this
.
getBaseUrl
((
baseUrl
)
=>
{
const
xhr
=
new
XMLHttpRequest
();
...
...
@@ -192,6 +194,7 @@ export abstract class middleLayerBase extends cc.Component {
}
this
.
reWriteAir
();
this
.
loadPageBundle
();
this
.
onCourseWareLoaded
();
});
}
...
...
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