房间类
More...
◆ AddExpectedUserIds()
async Task< List< string > > LeanCloud.Play.Room.AddExpectedUserIds |
( |
List< string > |
expectedUserIds | ) |
|
|
inline |
增加期望玩家
- Returns
- 期望玩家 Id 列表
- Parameters
-
◆ ClearExpectedUserIds()
async Task LeanCloud.Play.Room.ClearExpectedUserIds |
( |
| ) |
|
|
inline |
◆ Close()
async Task LeanCloud.Play.Room.Close |
( |
| ) |
|
|
inline |
◆ GetPlayer()
Player LeanCloud.Play.Room.GetPlayer |
( |
int |
actorId | ) |
|
|
inline |
根据 actorId 获取 Player 对象
- Returns
- 玩家对象
- Parameters
-
◆ KickPlayer()
async Task LeanCloud.Play.Room.KickPlayer |
( |
int |
actorId, |
|
|
int |
code, |
|
|
string |
reason |
|
) |
| |
|
inline |
踢掉玩家
- Parameters
-
actorId | 玩家 Id |
code | 附加码 |
reason | 附加消息 |
- Returns
◆ RemoveExpectedUserIds()
async Task< List< string > > LeanCloud.Play.Room.RemoveExpectedUserIds |
( |
List< string > |
expectedUserIds | ) |
|
|
inline |
删除期望玩家
- Returns
- 期望玩家 Id 列表
- Parameters
-
◆ SendEvent()
发送自定义事件
- Parameters
-
eventId | 事件 Id |
eventData | 事件参数 |
options | 事件选项 |
- Returns
◆ SetCustomProperties()
async Task LeanCloud.Play.Room.SetCustomProperties |
( |
PlayObject |
properties, |
|
|
PlayObject |
expectedValues = null |
|
) |
| |
|
inline |
设置房间的自定义属性
- Parameters
-
properties | 自定义属性 |
expectedValues | 期望属性,用于 CAS 检测 |
◆ SetExpectedUserIds()
async Task< List< string > > LeanCloud.Play.Room.SetExpectedUserIds |
( |
List< string > |
expectedUserIds | ) |
|
|
inline |
设置期望玩家
- Returns
- 期望玩家 Id 列表
- Parameters
-
◆ SetMaster()
async Task< Player > LeanCloud.Play.Room.SetMaster |
( |
int |
newMasterId | ) |
|
|
inline |
◆ SetMaxPlayerCount()
async Task< int > LeanCloud.Play.Room.SetMaxPlayerCount |
( |
int |
count | ) |
|
|
inline |
设置最大玩家数量
- Returns
- 房间最大玩家数量
- Parameters
-
◆ SetOpen()
async Task< bool > LeanCloud.Play.Room.SetOpen |
( |
bool |
open | ) |
|
|
inline |
设置开启 / 关闭
- Returns
- 房间是否开启
- Parameters
-
◆ SetPlayerCustomProperties()
async Task LeanCloud.Play.Room.SetPlayerCustomProperties |
( |
int |
actorId, |
|
|
PlayObject |
properties, |
|
|
PlayObject |
expectedValues |
|
) |
| |
|
inline |
设置玩家的自定义属性
- Parameters
-
actorId | 玩家 Id |
properties | 自定义属性 |
expectedValues | 期望属性,用于 CAS 检测 |
- Returns
◆ SetVisible()
async Task< bool > LeanCloud.Play.Room.SetVisible |
( |
bool |
visible | ) |
|
|
inline |
设置可见性
- Returns
- 房间是否可见
- Parameters
-
◆ CustomProperties
◆ ExpectedUserIds
List<string> LeanCloud.Play.Room.ExpectedUserIds |
|
getset |
◆ Master
Player LeanCloud.Play.Room.Master |
|
get |
◆ MasterActorId
int LeanCloud.Play.Room.MasterActorId |
|
getset |
◆ MaxPlayerCount
int LeanCloud.Play.Room.MaxPlayerCount |
|
getset |
◆ Name
string LeanCloud.Play.Room.Name |
|
getset |
◆ Open
bool LeanCloud.Play.Room.Open |
|
getset |
◆ Player
Player LeanCloud.Play.Room.Player |
|
get |
◆ PlayerList
List<Player> LeanCloud.Play.Room.PlayerList |
|
get |
◆ Visible
bool LeanCloud.Play.Room.Visible |
|
getset |
The documentation for this class was generated from the following file:
- Play/Play.Unity/Assets/LeanCloud/Play/Public/Room.cs