corgi-ws/src/rooms/schema/Player.ts
2021-05-21 17:09:39 +08:00

33 lines
482 B
TypeScript

import { Schema, type } from '@colyseus/schema'
export class Player extends Schema {
@type('string')
id: string
@type('string')
accountId: string
@type('string')
nickname: string
@type('string')
avatar: string
@type('number')
score: number
@type('number')
rank: number
team: number
@type('number')
online:number
constructor(id: string, accountId: string) {
super()
this.id = id
this.accountId = accountId
this.score = 0
}
}