This commit is contained in:
zhl 2020-12-04 16:54:45 +08:00
parent 1ad636dfeb
commit 13041f4f41

View File

@ -7,7 +7,7 @@ import {GameEnv} from "../../cfg/GameEnv";
export class Player extends Schema { export class Player extends Schema {
@type("string") @type("string")
id: number; id: string;
@type("number") @type("number")
heroId: number; heroId: number;
@ -54,6 +54,7 @@ export class Player extends Schema {
//TODO: set hp, ap from cfg //TODO: set hp, ap from cfg
constructor(id: string, heroId: number, team: number) { constructor(id: string, heroId: number, team: number) {
super(); super();
this.id = id;
this.state = 0; this.state = 0;
this.hp = 200; this.hp = 200;
this.ap = 30; this.ap = 30;