[add] Room OK

This commit is contained in:
建喵 2023-09-11 12:14:29 +08:00
parent 14a11e2f3a
commit 905fdff15f
4 changed files with 25 additions and 22 deletions

6
BaseConnection.ts Normal file
View File

@ -0,0 +1,6 @@
// declare module 'tsrpc' {
// export interface BaseConnection {
// // 自定义的新字段
// userId: string;
// }
// }

View File

@ -1,16 +1,19 @@
export enum EGameState {
Loading,
Ready,
Wait,
TurnCards,
ImageViewer,
ChooseCards,
MyLoading = 100,
MyReady = 100,
MyWait,
MyTurnCards,
MyImageViewer,
MyChooseCards,
OtherLoading = 200,
OtherTurnCards = 201,
OtherReady = 200,
OtherWait,
OtherTurnCards,
OtherImageViewer,
OtherChooseCards,
}

View File

@ -1 +1 @@
export type MsgChangeState = number
export type MsgChangeState = any[]

View File

@ -46,35 +46,34 @@ export interface ServiceType {
}
export const serviceProto: ServiceProto<ServiceType> = {
"version": 12,
"services": [
{
"id": 4,
"id": 0,
"name": "account/Login",
"type": "api"
},
{
"id": 0,
"id": 1,
"name": "Chat",
"type": "msg"
},
{
"id": 12,
"id": 2,
"name": "room/ChangeState",
"type": "msg"
},
{
"id": 10,
"id": 3,
"name": "room/Exit",
"type": "msg"
},
{
"id": 11,
"id": 4,
"name": "room/GoToGame",
"type": "msg"
},
{
"id": 13,
"id": 5,
"name": "room/ChangeState",
"type": "api"
},
@ -135,7 +134,10 @@ export const serviceProto: ServiceProto<ServiceType> = {
]
},
"room/MsgChangeState/MsgChangeState": {
"type": "Number"
"type": "Array",
"elementType": {
"type": "Any"
}
},
"room/MsgExit/MsgExit": {
"type": "Number"
@ -152,14 +154,6 @@ export const serviceProto: ServiceProto<ServiceType> = {
"type": {
"type": "Number"
}
},
{
"id": 1,
"name": "data",
"type": {
"type": "Any"
},
"optional": true
}
]
},
@ -170,7 +164,7 @@ export const serviceProto: ServiceProto<ServiceType> = {
"type": "Interface",
"properties": [
{
"id": 1,
"id": 0,
"name": "null",
"type": {
"type": "String"