Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JJ_Game_07
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
JJ_Game_07
Commits
3c0dd949
Commit
3c0dd949
authored
Dec 26, 2023
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: debug
parent
b5aaa443
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
.DS_Store
.DS_Store
+0
-0
JJ_Game_07.js
assets/JJ_Game_07/scene/JJ_Game_07.js
+7
-7
No files found.
.DS_Store
View file @
3c0dd949
No preview for this file type
assets/JJ_Game_07/scene/JJ_Game_07.js
View file @
3c0dd949
...
@@ -446,22 +446,22 @@ cc.Class({
...
@@ -446,22 +446,22 @@ cc.Class({
));
));
},
},
length
,
starLen
:
null
,
addStar
()
{
addStar
()
{
if
(
!
this
.
length
)
{
if
(
!
this
.
starLen
)
{
this
.
length
=
0
;
this
.
starLen
=
0
;
}
}
this
.
length
++
;
this
.
starLen
++
;
let
length
=
this
.
length
;
let
starLen
=
this
.
starLen
;
const
starLayout
=
cc
.
find
(
'
Canvas/layout
'
);
const
starLayout
=
cc
.
find
(
'
Canvas/layout
'
);
starLayout
.
removeAllChildren
();
starLayout
.
removeAllChildren
();
const
paddingY
=
starLayout
.
getComponent
(
cc
.
Layout
).
spacingY
;
const
paddingY
=
starLayout
.
getComponent
(
cc
.
Layout
).
spacingY
;
for
(
let
i
=
0
;
i
<
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
starLen
;
i
++
)
{
const
starBase
=
cc
.
instantiate
(
cc
.
find
(
'
StarBase
'
));
const
starBase
=
cc
.
instantiate
(
cc
.
find
(
'
StarBase
'
));
starBase
.
name
=
`starBase_
${
i
}
`
;
starBase
.
name
=
`starBase_
${
i
}
`
;
starBase
.
scale
=
this
.
Between
(
0.5
,
(
starLayout
.
height
/
length
-
paddingY
)
/
starBase
.
height
,
1
);
starBase
.
scale
=
this
.
Between
(
0.5
,
(
starLayout
.
height
/
starLen
-
paddingY
)
/
starBase
.
height
,
1
);
starBase
.
parent
=
starLayout
;
starBase
.
parent
=
starLayout
;
}
}
this
.
currentStarIdx
=
0
;
this
.
currentStarIdx
=
0
;
...
...
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