gamestate增加mode字段, 用于区分游戏模式
This commit is contained in:
parent
30f1650a10
commit
9411e3e133
@ -48,6 +48,9 @@ export class GeneralRoom extends Room {
|
||||
this.maxClients = options.clients
|
||||
}
|
||||
this.setState(cs);
|
||||
if (options.mode) {
|
||||
this.state.mode = +options.mode;
|
||||
}
|
||||
this.setPrivate(true);
|
||||
if (options.count) {
|
||||
this.robotCount = Math.min(Math.max(0, options.count), this.maxClients - 1);
|
||||
|
@ -360,6 +360,7 @@ export class RankedLobbyRoom extends Room {
|
||||
match: this.matchid,
|
||||
rank: group.averageRank,
|
||||
score: avaScore,
|
||||
mode: 1,
|
||||
count: this.numClientsToMatch - group.count
|
||||
})
|
||||
}, 10)
|
||||
|
@ -32,6 +32,15 @@ export class CardGameState extends Schema {
|
||||
*/
|
||||
@type("number")
|
||||
round: number;
|
||||
/**
|
||||
* 游戏模式
|
||||
* 1: 匹配
|
||||
* 2: 好友对战
|
||||
* 3: 娱乐
|
||||
* @type {number}
|
||||
*/
|
||||
@type("number")
|
||||
mode: number;
|
||||
/**
|
||||
* 当局游戏卡组队列
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user