Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
op_16
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
op_16
Commits
9770a0f5
Commit
9770a0f5
authored
Mar 01, 2022
by
范雪寒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc: 联机版模板文档
parent
0292a8d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
README.md
README.md
+27
-5
No files found.
README.md
View file @
9770a0f5
...
...
@@ -48,7 +48,7 @@ npm install
npm start
```
*
打开浏览器
:
http://staging-teach.ireadabc.com/template_ci/debug
*
打开浏览器
:
http://staging-teach.ireadabc.com/template_ci/debug
*
点击右上角齿轮,选择技术选型、调试模式选择“普通”
### 互动模板
...
...
@@ -61,7 +61,7 @@ npm start
npm start
```
*
打开浏览器
:
http://staging-teach.ireadabc.com/template_ci/debug
*
打开浏览器
:
http://staging-teach.ireadabc.com/template_ci/debug
*
点击右上角齿轮,选择技术选型、调试模式选择“互动”
*
左侧老师、右侧学生
...
...
@@ -85,16 +85,38 @@ npm start
### 关于联机模板
*
网络连接相关的代码位置
:
*
网络连接相关的代码位置
:
assets/script/NetworkHelper.ts
*
服务器相关代码位置
:
*
服务器相关代码位置
:
assets/script/Server.ts
*
AI相关代码位置
:
*
AI相关代码位置
:
assets/script/AI.ts
*
注意要将以下代码中的"op_16"参数改为自己的模板名称
```
this.networkHelper.init("op_16", 2);
```
*
联机对战引擎文档:
https://cloud.tencent.com/document/product/629/46678
https://cloud.tencent.com/document/product/1038/50849
### 联机模板额外的验收标准
*
联机功能可用
*
无人联机时,需要自动填充AI
*
有人掉线时,需弹出提示,让玩家自行选择退出或重开游戏
### 关于op_16的说明:
*
通信接口
SERVER_allPlayerInfo: 由server发给player,有玩家加入或离开时发送,用来更新玩家信息。
SERVER_updateStatus: 由server发给player,更新游戏状态,主要是回合结束换边等。
SERVER_playerRoll: 由server发给player,玩家转动转盘。
SERVER_playerRight: 由server发给player,玩家选择了正确的格子。
SERVER_playerWrong: 由server发给player,玩家选择了错误的格子。
SERVER_playerWin: 由server发给player,玩家胜利。
roll: player发送给server,玩家试图转动转盘。
right: player发送给server,玩家选择了正确的格子。
wrong: player发送给server,玩家选择了错误的格子。
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment