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
91867b28
Commit
91867b28
authored
Dec 11, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
5d313c64
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
542 additions
and
291 deletions
+542
-291
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+538
-291
Rank.ts
assets/Scripts/Scenes/MainGame/Components/Rank.ts
+4
-0
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
91867b28
This diff is collapsed.
Click to expand it.
assets/Scripts/Scenes/MainGame/Components/Rank.ts
View file @
91867b28
...
...
@@ -12,6 +12,8 @@ export class Rank extends Component {
@
property
(
Node
)
selfNode
:
Node
;
@
property
(
Label
)
rankTxt
:
Label
;
nodeMap
=
new
Map
<
number
,
Node
>
();
start
()
{
...
...
@@ -42,6 +44,8 @@ export class Rank extends Component {
return
b
.
length
-
a
.
length
;
});
this
.
rankTxt
.
string
=
`
${
snakes
.
indexOf
(
MainGame
.
ins
.
player
)
+
1
}
`
;
const
playerIndex
=
snakes
.
indexOf
(
MainGame
.
ins
.
player
);
for
(
let
i
=
0
;
i
<
snakes
.
length
;
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