{"action":"created","comment":{"url":"https://api.github.com/repos/leancloud/docs/pulls/comments/203304756","pull_request_review_id":138164724,"id":203304756,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMzMwNDc1Ng==","diff_hunk":"@@ -6,7 +6,7 @@ Play 是专门针对多人在线对战游戏推出的后端服务。开发者不\n ## 核心功能\n - **玩家匹配**：随机或按指定条件将玩家匹配到一起玩游戏。Play 的匹配操作会将即将一起游戏的玩家匹配到同一个房间（Room）中。例如《第五人格》、《王者荣耀》、《吃鸡》等对战类手游，玩家只需点击「自由匹配」就可以迅速匹配到其他玩家，大家进入到同一个房间中准备开始游戏；玩家也可以自己新开房间邀请好友一起玩。\n - **多人在线对战**：客户端与服务端使用 WebSocket 通道进行实时双向通信，确保游戏内所有消息能够快速同步。\n-- **游戏逻辑运算**：Play 提供了 [MasterClient](play-unity.html#masterClient) 作为客户端主机控制游戏逻辑。游戏内的所有逻辑都交给 MasterClient 来判断运转，如果 MasterClient 意外掉线，Play 会自动将网络状态最好的客户端切换为 MasterClient，确保游戏顺畅进行；开发者也可以选择在服务端编写游戏逻辑（服务端游戏逻辑支持尚在开发中）。\n+- **游戏逻辑运算**：Play 提供了 [MasterClient](play-js.html#masterClient) 作为客户端主机控制游戏逻辑。游戏内的所有逻辑都交给 MasterClient 来判断运转，如果 MasterClient 意外掉线，Play 会自动将网络状态最好的客户端切换为 MasterClient，确保游戏顺畅进行；开发者也可以选择在服务端编写游戏逻辑（服务端游戏逻辑支持尚在开发中）。","path":"views/play.md","position":5,"original_position":5,"commit_id":"3bc199b4123c704f5c7888cbd9fd643be83181db","original_commit_id":"7480222267e525973e1043cf39e92f3694cce484","user":{"login":"nicecui","id":10130959,"node_id":"MDQ6VXNlcjEwMTMwOTU5","avatar_url":"https://avatars1.githubusercontent.com/u/10130959?v=4","gravatar_id":"","url":"https://api.github.com/users/nicecui","html_url":"https://github.com/nicecui","followers_url":"https://api.github.com/users/nicecui/followers","following_url":"https://api.github.com/users/nicecui/following{/other_user}","gists_url":"https://api.github.com/users/nicecui/gists{/gist_id}","starred_url":"https://api.github.com/users/nicecui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicecui/subscriptions","organizations_url":"https://api.github.com/users/nicecui/orgs","repos_url":"https://api.github.com/users/nicecui/repos","events_url":"https://api.github.com/users/nicecui/events{/privacy}","received_events_url":"https://api.github.com/users/nicecui/received_events","type":"User","site_admin":false},"body":"我们还没有全局选语言的方式，只能选一个默认语言，就现在 SDK 的完整度来说，默认选了 JS。后面这里考虑这两种方式之一：\r\n1、文档里面设置全局语言变量，根据语言变量选择相应的语言链接。\r\n2、C# 和 JavaScript 语言合并，这样一个链接就可以了。\r\n\r\n为了快速上线，可不可以先放 JS 的链接上去？我先修一下这个链接。","created_at":"2018-07-18T09:08:48Z","updated_at":"2018-07-18T09:08:48Z","html_url":"https://github.com/leancloud/docs/pull/2637#discussion_r203304756","pull_request_url":"https://api.github.com/repos/leancloud/docs/pulls/2637","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/leancloud/docs/pulls/comments/203304756"},"html":{"href":"https://github.com/leancloud/docs/pull/2637#discussion_r203304756"},"pull_request":{"href":"https://api.github.com/repos/leancloud/docs/pulls/2637"}},"in_reply_to_id":203272830},"pull_request":{"url":"https://api.github.com/repos/leancloud/docs/pulls/2637","id":201935403,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxOTM1NDAz","html_url":"https://github.com/leancloud/docs/pull/2637","diff_url":"https://github.com/leancloud/docs/pull/2637.diff","patch_url":"https://github.com/leancloud/docs/pull/2637.patch","issue_url":"https://api.github.com/repos/leancloud/docs/issues/2637","number":2637,"state":"open","locked":false,"title":"feat: Play 增加 JavaScript 文档","user":{"login":"nicecui","id":10130959,"node_id":"MDQ6VXNlcjEwMTMwOTU5","avatar_url":"https://avatars1.githubusercontent.com/u/10130959?v=4","gravatar_id":"","url":"https://api.github.com/users/nicecui","html_url":"https://github.com/nicecui","followers_url":"https://api.github.com/users/nicecui/followers","following_url":"https://api.github.com/users/nicecui/following{/other_user}","gists_url":"https://api.github.com/users/nicecui/gists{/gist_id}","starred_url":"https://api.github.com/users/nicecui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicecui/subscriptions","organizations_url":"https://api.github.com/users/nicecui/orgs","repos_url":"https://api.github.com/users/nicecui/repos","events_url":"https://api.github.com/users/nicecui/events{/privacy}","received_events_url":"https://api.github.com/users/nicecui/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-17T13:07:46Z","updated_at":"2018-07-18T09:08:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d024c3cee032317c98362661f76f52e45add2603","assignee":null,"assignees":[],"requested_reviewers":[{"login":"myleslee","id":108758,"node_id":"MDQ6VXNlcjEwODc1OA==","avatar_url":"https://avatars0.githubusercontent.com/u/108758?v=4","gravatar_id":"","url":"https://api.github.com/users/myleslee","html_url":"https://github.com/myleslee","followers_url":"https://api.github.com/users/myleslee/followers","following_url":"https://api.github.com/users/myleslee/following{/other_user}","gists_url":"https://api.github.com/users/myleslee/gists{/gist_id}","starred_url":"https://api.github.com/users/myleslee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myleslee/subscriptions","organizations_url":"https://api.github.com/users/myleslee/orgs","repos_url":"https://api.github.com/users/myleslee/repos","events_url":"https://api.github.com/users/myleslee/events{/privacy}","received_events_url":"https://api.github.com/users/myleslee/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/leancloud/docs/pulls/2637/commits","review_comments_url":"https://api.github.com/repos/leancloud/docs/pulls/2637/comments","review_comment_url":"https://api.github.com/repos/leancloud/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leancloud/docs/issues/2637/comments","statuses_url":"https://api.github.com/repos/leancloud/docs/statuses/3bc199b4123c704f5c7888cbd9fd643be83181db","head":{"label":"leancloud:stg-play-js","ref":"stg-play-js","sha":"3bc199b4123c704f5c7888cbd9fd643be83181db","user":{"login":"leancloud","id":6660518,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NjA1MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/6660518?v=4","gravatar_id":"","url":"https://api.github.com/users/leancloud","html_url":"https://github.com/leancloud","followers_url":"https://api.github.com/users/leancloud/followers","following_url":"https://api.github.com/users/leancloud/following{/other_user}","gists_url":"https://api.github.com/users/leancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/leancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leancloud/subscriptions","organizations_url":"https://api.github.com/users/leancloud/orgs","repos_url":"https://api.github.com/users/leancloud/repos","events_url":"https://api.github.com/users/leancloud/events{/privacy}","received_events_url":"https://api.github.com/users/leancloud/received_events","type":"Organization","site_admin":false},"repo":{"id":25067518,"node_id":"MDEwOlJlcG9zaXRvcnkyNTA2NzUxOA==","name":"docs","full_name":"leancloud/docs","owner":{"login":"leancloud","id":6660518,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NjA1MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/6660518?v=4","gravatar_id":"","url":"https://api.github.com/users/leancloud","html_url":"https://github.com/leancloud","followers_url":"https://api.github.com/users/leancloud/followers","following_url":"https://api.github.com/users/leancloud/following{/other_user}","gists_url":"https://api.github.com/users/leancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/leancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leancloud/subscriptions","organizations_url":"https://api.github.com/users/leancloud/orgs","repos_url":"https://api.github.com/users/leancloud/repos","events_url":"https://api.github.com/users/leancloud/events{/privacy}","received_events_url":"https://api.github.com/users/leancloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leancloud/docs","description":"LeanCloud Documentation","fork":false,"url":"https://api.github.com/repos/leancloud/docs","forks_url":"https://api.github.com/repos/leancloud/docs/forks","keys_url":"https://api.github.com/repos/leancloud/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leancloud/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leancloud/docs/teams","hooks_url":"https://api.github.com/repos/leancloud/docs/hooks","issue_events_url":"https://api.github.com/repos/leancloud/docs/issues/events{/number}","events_url":"https://api.github.com/repos/leancloud/docs/events","assignees_url":"https://api.github.com/repos/leancloud/docs/assignees{/user}","branches_url":"https://api.github.com/repos/leancloud/docs/branches{/branch}","tags_url":"https://api.github.com/repos/leancloud/docs/tags","blobs_url":"https://api.github.com/repos/leancloud/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leancloud/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leancloud/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/leancloud/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leancloud/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/leancloud/docs/languages","stargazers_url":"https://api.github.com/repos/leancloud/docs/stargazers","contributors_url":"https://api.github.com/repos/leancloud/docs/contributors","subscribers_url":"https://api.github.com/repos/leancloud/docs/subscribers","subscription_url":"https://api.github.com/repos/leancloud/docs/subscription","commits_url":"https://api.github.com/repos/leancloud/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/leancloud/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/leancloud/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/leancloud/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/leancloud/docs/contents/{+path}","compare_url":"https://api.github.com/repos/leancloud/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leancloud/docs/merges","archive_url":"https://api.github.com/repos/leancloud/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leancloud/docs/downloads","issues_url":"https://api.github.com/repos/leancloud/docs/issues{/number}","pulls_url":"https://api.github.com/repos/leancloud/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/leancloud/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/leancloud/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leancloud/docs/labels{/name}","releases_url":"https://api.github.com/repos/leancloud/docs/releases{/id}","deployments_url":"https://api.github.com/repos/leancloud/docs/deployments","created_at":"2014-10-11T07:14:37Z","updated_at":"2018-07-16T11:07:38Z","pushed_at":"2018-07-18T08:18:18Z","git_url":"git://github.com/leancloud/docs.git","ssh_url":"git@github.com:leancloud/docs.git","clone_url":"https://github.com/leancloud/docs.git","svn_url":"https://github.com/leancloud/docs","homepage":"https://leancloud.cn/docs/","size":67672,"stargazers_count":497,"watchers_count":497,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":253,"mirror_url":null,"archived":false,"open_issues_count":82,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":253,"open_issues":82,"watchers":497,"default_branch":"master"}},"base":{"label":"leancloud:master","ref":"master","sha":"ca6650921cd64a7c69a7d39620f1edc6a253239a","user":{"login":"leancloud","id":6660518,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NjA1MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/6660518?v=4","gravatar_id":"","url":"https://api.github.com/users/leancloud","html_url":"https://github.com/leancloud","followers_url":"https://api.github.com/users/leancloud/followers","following_url":"https://api.github.com/users/leancloud/following{/other_user}","gists_url":"https://api.github.com/users/leancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/leancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leancloud/subscriptions","organizations_url":"https://api.github.com/users/leancloud/orgs","repos_url":"https://api.github.com/users/leancloud/repos","events_url":"https://api.github.com/users/leancloud/events{/privacy}","received_events_url":"https://api.github.com/users/leancloud/received_events","type":"Organization","site_admin":false},"repo":{"id":25067518,"node_id":"MDEwOlJlcG9zaXRvcnkyNTA2NzUxOA==","name":"docs","full_name":"leancloud/docs","owner":{"login":"leancloud","id":6660518,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY2NjA1MTg=","avatar_url":"https://avatars2.githubusercontent.com/u/6660518?v=4","gravatar_id":"","url":"https://api.github.com/users/leancloud","html_url":"https://github.com/leancloud","followers_url":"https://api.github.com/users/leancloud/followers","following_url":"https://api.github.com/users/leancloud/following{/other_user}","gists_url":"https://api.github.com/users/leancloud/gists{/gist_id}","starred_url":"https://api.github.com/users/leancloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leancloud/subscriptions","organizations_url":"https://api.github.com/users/leancloud/orgs","repos_url":"https://api.github.com/users/leancloud/repos","events_url":"https://api.github.com/users/leancloud/events{/privacy}","received_events_url":"https://api.github.com/users/leancloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leancloud/docs","description":"LeanCloud Documentation","fork":false,"url":"https://api.github.com/repos/leancloud/docs","forks_url":"https://api.github.com/repos/leancloud/docs/forks","keys_url":"https://api.github.com/repos/leancloud/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leancloud/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leancloud/docs/teams","hooks_url":"https://api.github.com/repos/leancloud/docs/hooks","issue_events_url":"https://api.github.com/repos/leancloud/docs/issues/events{/number}","events_url":"https://api.github.com/repos/leancloud/docs/events","assignees_url":"https://api.github.com/repos/leancloud/docs/assignees{/user}","branches_url":"https://api.github.com/repos/leancloud/docs/branches{/branch}","tags_url":"https://api.github.com/repos/leancloud/docs/tags","blobs_url":"https://api.github.com/repos/leancloud/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leancloud/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leancloud/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/leancloud/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leancloud/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/leancloud/docs/languages","stargazers_url":"https://api.github.com/repos/leancloud/docs/stargazers","contributors_url":"https://api.github.com/repos/leancloud/docs/contributors","subscribers_url":"https://api.github.com/repos/leancloud/docs/subscribers","subscription_url":"https://api.github.com/repos/leancloud/docs/subscription","commits_url":"https://api.github.com/repos/leancloud/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/leancloud/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/leancloud/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/leancloud/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/leancloud/docs/contents/{+path}","compare_url":"https://api.github.com/repos/leancloud/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leancloud/docs/merges","archive_url":"https://api.github.com/repos/leancloud/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leancloud/docs/downloads","issues_url":"https://api.github.com/repos/leancloud/docs/issues{/number}","pulls_url":"https://api.github.com/repos/leancloud/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/leancloud/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/leancloud/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leancloud/docs/labels{/name}","releases_url":"https://api.github.com/repos/leancloud/docs/releases{/id}","deployments_url":"https://api.github.com/repos/leancloud/docs/deployments","created_at":"2014-10-11T07:14:37Z","updated_at":"2018-07-16T11:07:38Z","pushed_at":"2018-07-18T08:18:18Z","git_url":"git://github.com/leancloud/docs.git","ssh_url":"git@github.com:leancloud/docs.git","clone_url":"https://github.com/leancloud/docs.git","svn_url":"https://github.com/leancloud/docs","homepage":"https://leancloud.cn/docs/","size":67672,"stargazers_count":497,"watchers_count":497,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":253,"mirror_url":null,"archived":false,"open_issues_count":82,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":253,"open_issues":82,"watchers":497,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/leancloud/docs/pulls/2637"},"html":{"href":"https://github.com/leancloud/docs/pull/2637"},"issue":{"href":"https://api.github.com/repos/leancloud/docs/issues/2637"},"comments":{"href":"https://api.github.com/repos/leancloud/docs/issues/2637/comments"},"review_comments":{"href":"https://api.github.com/repos/leancloud/docs/pulls/2637/comments"},"review_comment":{"href":"https://api.github.com/repos/leancloud/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leancloud/docs/pulls/2637/commits"},"statuses":{"href":"https://api.github.com/repos/leancloud/docs/statuses/3bc199b4123c704f5c7888cbd9fd643be83181db"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nicecui"}}