Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DG_FAF
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
DG_FAF
Commits
bec58e44
Commit
bec58e44
authored
Mar 29, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加页面渲染时的滚动禁止
parent
cc04092e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
DG_FAF.ts
assets/DG_FAF/scene/DG_FAF.ts
+5
-1
No files found.
assets/DG_FAF/scene/DG_FAF.ts
View file @
bec58e44
...
...
@@ -83,6 +83,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async
onLoadEnd
()
{
// TODO 加载完成后的逻辑写在这里
console
.
log
(
this
.
data
);
this
.
disableScroll
();
// 禁用页面滚动
this
.
initSize
();
// 页面尺寸
this
.
initMiddleLayer
();
// 中间层相关
this
.
initEventListener
();
// 事件监听
...
...
@@ -92,6 +93,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initScorePanel
();
this
.
initActionButton
();
this
.
initScoreShow
();
this
.
enableScroll
();
// 启用页面滚动
this
.
startTimestamp
=
new
Date
().
getTime
();
}
...
...
@@ -2740,9 +2742,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
child
.
destroy
();
})
this
.
disableScroll
();
// 禁用页面滚动
await
this
.
initHotZoneBg
();
this
.
initHotZoneItem
();
this
.
initScorePanel
();
this
.
enableScroll
();
// 启用页面滚动
}
// 禁用页面滚动
...
...
@@ -2751,7 +2755,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
scorllView
.
enabled
=
false
;
}
//
禁
用页面滚动
//
启
用页面滚动
enableScroll
()
{
const
scorllView
=
cc
.
find
(
"
Canvas/MainContent/ScorllView
"
).
getComponent
(
cc
.
ScrollView
);
scorllView
.
enabled
=
true
;
...
...
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