创建表
创建排行榜表。
调用信息
public void TableCreate (TableManage tableManage, PlayNANOODelegate callback) {}
调用详细信息
| 参数 | 说明 | 类型 |
|---|---|---|
| tableManage | 表设置信息 | MultiSaveParam |
| callback | 通信结果 | PlayNANOODelegate |
源代码
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
PlayNANOO.LeaderBoard.v20240301.TableManage tableManage = new PlayNANOO.LeaderBoard.v20240301.TableManage();
tableManage.uid = "ID";
tableManage.name = "ROTATION";
tableManage.rotation = PlayNANOO.LeaderBoard.v20240301.Rotaion.ROTATION;
tableManage.recordType = PlayNANOO.LeaderBoard.v20240301.RecordType.HIGHSCORE;
tableManage.recordSortType = PlayNANOO.LeaderBoard.v20240301.SortType.DESC;
tableManage.recordPriority = false;
tableManage.rotationDetail = new PlayNANOO.LeaderBoard.v20240301.TableManageRotationDetail();
tableManage.rotationDetail.period = 10;
tableManage.rotationDetail.timeOffset = 32400;
tableManage.rotationDetail.date = "2024-03-01";
tableManage.rotationDetail.time = "15:00";
plugin.LeaderboardManagerV20240301.TableCreate(tableManage, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log("Success");
Debug.Log(values["TableId"]);
}
else
{
Debug.Log("Fail");
}
});
}
}
TableManage 详细信息
| 数据键 | 说明 | 类型 |
|---|---|---|
| uid | 表识别 ID(未输入时随机生成) | string |
| name | 表名称 | string |
| ratation | 排行榜更新周期 | TableCreate.rotation |
| recordType | 排行榜记录方式 | TableCreate.recordType |
| recordSortType | 排行榜排序方式 | TableCreate.recordSortType |
| recordPriority | 排行榜记录优先级设置 | boolean |
| rotationDetail.period | 排行榜更新周期 | integer |
| rotationDetail.timeOffset | 排行榜时间 TimeOffset(基于 UTC 输入时间差) | integer |
| rotationDetail.date | 排行榜开始日期(以 UTC 时间输入) | string |
| rotationDetail.time | 排行榜开始时间(以 UTC 时间输入) | string |
信息
rotationDetail 信息仅在设置了排行榜更新周期时才需要输入。
通信结果
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"TableId": "string"
}
通信结果详细信息
| 数据键 | 说明 | 类型 |
|---|---|---|
| TableId | 表代码 | string |