Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NEXT_test001
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
NEXT_test001
Commits
eb55c6a5
Commit
eb55c6a5
authored
Mar 09, 2022
by
chenli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释
parent
995eb636
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
NEXT_test001.ts
assets/NEXT_test001/scene/NEXT_test001.ts
+10
-0
MyCocosSceneComponent.ts
assets/NEXT_test001/script/MyCocosSceneComponent.ts
+2
-2
No files found.
assets/NEXT_test001/scene/NEXT_test001.ts
View file @
eb55c6a5
...
...
@@ -41,6 +41,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
this
.
initIcon
();
}
test
(){
//移动端才有的方法调试的需要真机,浏览器没有
window
[
"
courseware
"
].
startTest
(
"
aa bb cc
"
);
window
[
"
courseware
"
].
stopTest
((
res
)
=>
{
console
.
log
(
res
);
});
}
initBg
()
{
const
bgNode
=
cc
.
find
(
'
Canvas/bg
'
);
bgNode
.
scale
=
this
.
_mapScaleMax
;
...
...
assets/NEXT_test001/script/MyCocosSceneComponent.ts
View file @
eb55c6a5
...
...
@@ -41,8 +41,8 @@ export class MyCocosSceneComponent extends cc.Component {
sx
=
frameSize
.
width
/
this
.
_designSize
.
width
;
sy
=
frameSize
.
height
/
this
.
_designSize
.
height
;
this
.
_mapScaleMin
=
Math
.
min
(
sx
,
sy
)
*
this
.
_cocosScale
;
this
.
_mapScaleMax
=
Math
.
max
(
sx
,
sy
)
*
this
.
_cocosScale
;
this
.
_mapScaleMin
=
Math
.
min
(
sx
,
sy
)
*
this
.
_cocosScale
;
//其他
this
.
_mapScaleMax
=
Math
.
max
(
sx
,
sy
)
*
this
.
_cocosScale
;
//背景
cc
.
director
[
'
_scene
'
].
width
=
frameSize
.
width
;
cc
.
director
[
'
_scene
'
].
height
=
frameSize
.
height
;
...
...
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