类型 函数 库 gamecircle.* 返回值 无 修订版 2024.3703 版 关键字 Low、List、SyncableNumberList、Length、Whispersync
设置 LowNumber 列表的最大长度。此数字由 Amazon GameCircle SDK 限制为最高 1,000。默认长度为 5。
gamecircle.Whispersync.SetLowNumberListLength(key, value) gamecircle.Whispersync.SetLowNumberListLength(key, value)
字符串. 用于访问特定最小数字的键。
数字. 要分配给最小数字的值。
local lowListKey = "myFirstLowNumberList"
local gamecircle = require("plugin.gamecircle")
gamecircle.Init(false, false, true)
gamecircle.Whispersync.SetLowNumberListLength(lowListKey, 4)
gamecircle.Whispersync.AddToLowNumberList(lowListKey, 10, "INT")
gamecircle.Whispersync.AddToLowNumberList(lowListKey, 1000, "INT")
gamecircle.Whispersync.AddToLowNumberList(lowListKey, 1, "INT")
gamecircle.Whispersync.AddToLowNumberList(lowListKey, 10000, "INT")
gamecircle.Whispersync.AddToLowNumberList(lowListKey, 100, "INT")
print("Here is the list of numbers as they are stored in the low number list. They should be in the order from lowest to highest.")
local lowList = gamecircle.Whispersync.GetLowNumberList(lowListKey)
for i,entry in ipairs(lowList) do
print("-" entry.value)
end
local keys = gamecircle.Whispersync.GetLowNumberListKeys()
for i,key in ipairs(keys) do
print("-" .. key)
end