Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NJ_ShaMo
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
NJ_ShaMo
Commits
b66326cc
Commit
b66326cc
authored
Nov 15, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://vcs.ireadabc.com/template/NJ_ShaMo
parents
b7cd1374
01c4c0d2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1253 additions
and
1021 deletions
+1253
-1021
.DS_Store
.DS_Store
+0
-0
NJ_ShaMo.fire
assets/NJ_ShaMo/scene/NJ_ShaMo.fire
+1242
-1021
NJ_ShaMo.ts
assets/NJ_ShaMo/scene/NJ_ShaMo.ts
+11
-0
No files found.
.DS_Store
View file @
b66326cc
No preview for this file type
assets/NJ_ShaMo/scene/NJ_ShaMo.fire
View file @
b66326cc
This diff is collapsed.
Click to expand it.
assets/NJ_ShaMo/scene/NJ_ShaMo.ts
View file @
b66326cc
...
...
@@ -86,6 +86,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
async
initView
()
{
const
canvas
=
cc
.
find
(
'
Canvas
'
);
const
touchboard
=
cc
.
find
(
'
Canvas/touchboard
'
);
const
contant
=
cc
.
find
(
'
Canvas/touchboard/contant
'
);
const
scale
=
touchboard
.
height
/
contant
.
height
;
...
...
@@ -94,6 +95,16 @@ export default class SceneComponent extends MyCocosSceneComponent {
contant
.
scale
=
scale
;
contant
.
x
=
contant
.
width
/
2
-
touchboard
.
width
/
2
;
if
((
canvas
.
width
/
canvas
.
height
)
>=
1
)
{
// 横屏
}
else
{
// 竖屏
const
bg
=
cc
.
find
(
'
Canvas/touchboard/contant/bg
'
);
bg
.
x
=
-
1600
;
bg
.
y
=
-
150
;
bg
.
scale
=
0.3
;
}
const
bg
=
cc
.
find
(
'
Canvas/touchboard/contant/bg
'
);
for
(
let
i
=
0
;
i
<
36
;
i
++
)
{
const
btn
=
seekChildByName
(
bg
,
`btn_
${
i
}
`
);
...
...
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