Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
MingSnake_241120
Commits
bff51715
Commit
bff51715
authored
Dec 11, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
1fa0adc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Snake.ts
assets/Scripts/Scenes/MainGame/Snake.ts
+2
-2
No files found.
assets/Scripts/Scenes/MainGame/Snake.ts
View file @
bff51715
...
...
@@ -462,7 +462,7 @@ export class Snake extends Component {
this
.
accEffectNode
.
active
=
true
;
const
count
=
this
.
bodyArr
.
length
/
2
>>
0
;
const
count
=
this
.
bodyArr
.
length
/
4
>>
0
;
for
(
let
i
=
this
.
accEffectArr
.
length
-
1
;
i
<
count
;
i
++
)
{
const
accEffect
=
accEffectPool
.
get
()
||
instantiate
(
this
.
accEffectPrefab
);
this
.
accEffectNode
.
addChild
(
accEffect
);
...
...
@@ -477,7 +477,7 @@ export class Snake extends Component {
const
len
=
this
.
accEffectArr
.
length
;
for
(
let
i
=
1
;
i
<
len
;
i
++
)
{
const
node
=
this
.
accEffectArr
[
i
];
const
body
=
this
.
bodyArr
[
i
*
2
-
1
];
const
body
=
this
.
bodyArr
[
i
*
4
-
1
];
node
.
setPosition
(
body
.
position
);
node
.
angle
=
body
.
angle
;
node
.
setScale
(
this
.
scale
,
this
.
scale
);
...
...
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