Commit 2ad0c722 authored by 范雪寒's avatar 范雪寒

feat:

parent a4b14eb4
...@@ -95,28 +95,27 @@ assets/script/Server.ts ...@@ -95,28 +95,27 @@ assets/script/Server.ts
assets/script/AI.ts assets/script/AI.ts
* 注意要将以下代码中的"op_16"参数改为自己的模板名称 * 注意要将以下代码中的"op_16"参数改为自己的模板名称
``` ```
this.networkHelper.init("op_16", 2); this.networkHelper.init("op_16", 2);
``` ```
* 联机对战引擎文档:
https://cloud.tencent.com/document/product/629/46678
https://cloud.tencent.com/document/product/1038/50849
### 联机模板额外的验收标准 ### 联机模板额外的验收标准
* 联机功能可用 * 联机功能可用
* 无人联机时,需要自动填充AI * 无人联机时,需要自动填充AI
* 有人掉线时,需弹出提示,让玩家自行选择退出或重开游戏 * 有人掉线时,需弹出提示,让玩家自行选择退出或重开游戏
### 关于op_16的说明: ### 关于op_16的说明:
* 通信接口 #### 通信接口
SERVER_allPlayerInfo: 由server发给player,有玩家加入或离开时发送,用来更新玩家信息。 ##### 客户端接收的部分:
SERVER_updateStatus: 由server发给player,更新游戏状态,主要是回合结束换边等。 * SERVER_allPlayerInfo: 由server发给player,有玩家加入或离开时发送,用来更新玩家信息。
SERVER_playerRoll: 由server发给player,玩家转动转盘。 * SERVER_updateStatus: 由server发给player,更新游戏状态,主要是回合结束换边等。
SERVER_playerRight: 由server发给player,玩家选择了正确的格子。 * SERVER_playerRoll: 由server发给player,玩家转动转盘。
SERVER_playerWrong: 由server发给player,玩家选择了错误的格子。 * SERVER_playerRight: 由server发给player,玩家选择了正确的格子。
SERVER_playerWin: 由server发给player,玩家胜利。 * SERVER_playerWrong: 由server发给player,玩家选择了错误的格子。
* SERVER_playerWin: 由server发给player,玩家胜利。
roll: player发送给server,玩家试图转动转盘。
right: player发送给server,玩家选择了正确的格子。 ##### 服务端接收的部分:
wrong: player发送给server,玩家选择了错误的格子。 * roll: player发送给server,玩家试图转动转盘。
* right: player发送给server,玩家选择了正确的格子。
* wrong: player发送给server,玩家选择了错误的格子。
* playerInfo: 非AI的player发送给server,玩家报告自己的昵称与头像url。
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment