Social
社交控件
对社交控制进行操作枚举列表
Social.InteractType
- 描述: 玩家社交组件中的控件类型
| 成员名称 | 成员说明 |
|---|---|
| HeadIconUpTag | 头像上方标签 |
| HeadIconRightTag | 头像右侧标签 |
| RightInterButton | 右侧互动按钮 |
函数列表
SetSocialWidgetVisible
-
描述: 设置社交组件中控件可见性
-
范围: 客户端
参数列表:
| 参数 | 类型 | 说明 |
|---|---|---|
| PlayerIdList | number[] | 目标玩家id数组 |
| InteractType | Social.InteractType | 要设置的控件类型 |
| Visible | boolean | true显示控件,false隐藏控件 |
local PlayerId = 610140737494668368local PlayerIdList = {}table.insert(PlayerIdList,PlayerId)local InteractType = Social.InteractType.HeadIconRightTagSocial:SetSocialWidgetVisible(PlayerIdList,InteractType,false)SetSocialWidgetText
-
描述: 设置社交组件中控件文本
-
范围: 客户端
参数列表:
| 参数 | 类型 | 说明 |
|---|---|---|
| PlayerIdList | number[] | 目标玩家id数组 |
| InteractType | Social.InteractType | 要设置的控件类型 |
| StrNewText | string | 显示内容 |
local PlayerId = 610140737494668368local PlayerIdList = {}table.insert(PlayerIdList,PlayerId)local InteractType = Social.InteractType.HeadIconRightTaglocal StrNewText = "测试"Social:SetSocialWidgetText(PlayerIdList,InteractType,StrNewText)SetRecordTabText
-
描述: 向社交记录页签添加信息
-
范围: 客户端
参数列表:
| 参数 | 类型 | 说明 |
|---|---|---|
| PlayerId | number | 玩家id |
| StrNewText | string | 信息内容 |
Social:SetRecordTabText(610140737494668368, "记录内容")GetStrangerList
-
描述: 获取陌生人玩家
-
范围: 服务端
参数列表:
| 参数 | 类型 | 说明 |
|---|---|---|
| PlayerUID | number | 玩家Uid |
返回字段:
| 返回字段 | 字段类型 | 说明 |
|---|---|---|
| StrangerList | number[] | 陌生人玩家列表 |
local StrangerList = Social:GetStrangerList(PlayerUID)