Commit 91867b28 authored by haiyoucuv's avatar haiyoucuv

init

parent 5d313c64
This diff is collapsed.
......@@ -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++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment