增加玩家死亡的广播消息
This commit is contained in:
parent
7dd2c82a50
commit
080badc9cd
6
src/global.d.ts
vendored
6
src/global.d.ts
vendored
@ -162,6 +162,12 @@ declare module 'colyseus' {
|
|||||||
*/
|
*/
|
||||||
sMsgQueue(client: Client, data: IMsg[]): void;
|
sMsgQueue(client: Client, data: IMsg[]): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广播玩家死亡消息
|
||||||
|
* @param data
|
||||||
|
* @param options
|
||||||
|
*/
|
||||||
|
bPlayerDead(data: any, options?: any) : void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 广播的消息列表
|
* 广播的消息列表
|
||||||
|
@ -235,6 +235,11 @@ Object.defineProperties(Room.prototype, {
|
|||||||
this.send(client, "change_pet_s2c", data);
|
this.send(client, "change_pet_s2c", data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
bPlayerDead: {
|
||||||
|
value: function (data: any, options?: any) {
|
||||||
|
this.broadcast('player_dead_s2c', data, options);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
send: {
|
send: {
|
||||||
value: function (client: Client, type: string, data?: any) {
|
value: function (client: Client, type: string, data?: any) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user