pet增加吸血和buff列表属性

This commit is contained in:
zhl 2020-12-31 17:25:52 +08:00
parent 03a52351ed
commit 5eb3e34695
2 changed files with 13 additions and 0 deletions

View File

@ -17,6 +17,8 @@ export class PetInfo {
silence: number; //是否被沉默, 剩几回合
effectCount: number; // 效果牌数量
point: number; // 点数
hps: number; // 吸血
buffs: number[]; // buff数组
}
export class PetInfoMsg implements IMsg {
data: any;

View File

@ -1,4 +1,5 @@
import {Schema, ArraySchema, type} from "@colyseus/schema";
import {Card} from "./Card";
export class Pet extends Schema {
@type("number")
@ -52,6 +53,16 @@ export class Pet extends Schema {
*/
@type("number")
state: number;
/**
*
*/
@type("number")
hps?: number;
/**
* buff列表
*/
@type(["number"])
buffs = new ArraySchema<number>()
constructor(index: number) {
super();
this.pos = index;