This commit is contained in:
2022-05-04 11:13:09 +08:00
parent 3d331ee10d
commit 0b76b5935d
68 changed files with 38788 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
import { ApiCallWs } from "tsrpc";
import { roomInstance } from "..";
import { ReqJoin, ResJoin } from "../shared/protocols/PtlJoin";
export async function ApiJoin(call: ApiCallWs<ReqJoin, ResJoin>): Promise<void> {
let playerId: number = roomInstance.join(call.req, call.conn);
call.succ({
playerId: playerId,
gameState: roomInstance.gameSystem.state
});
}