gamecircle.Whispersync.GetLatestNumberKeys

类型 函数
gamecircle.*
返回值 键表 (KeyTable)
修订 版本 2024.3703
关键词 最新, 可同步数字, Whispersync

概述

返回当前 Whispersync GameData 级别下存储的所有最新数字的键。返回值是一个 键表 (KeyTable)

语法

local keys = gamecircle.Whispersync.GetLatestNumberKeys()

示例

local latestNumKey = "myFirstLatestNumber" 
local gamecircle = require("plugin.gamecircle")  
gamecircle.Init(false, false, true)  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 10, "INT")  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 1000, "INT")  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 1, "INT")  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 10000, "INT")  
gamecircle.Whispersync.SetLatestNumber(latestNumKey, 100, "INT")  
print("The Latest Number is: " .. gamecircle.Whispersync.GetLatestNumber(latestNumKey, "INT").value)  
print("These are all the Latest Number values stored under the current GameData set of Whispersync.")  
local keys = gamecircle.Whispersync.GetLatestNumberKeys()  
for i,key in ipairs(keys) do  
    print("-" .. key)  
end