类型 函数 库 gamecircle.* 返回值 无 修订版本 版本 2024.3703 关键词 Whispersync,GameData,Step,Down
使用给定的“键”在 Whispersync 的 GameData 树中向下移动一级。如果当前 GameData 对象没有名为“键”的子级,则会创建一个。但是,在为其分配某种数据之前,该对象不会保存到磁盘或云端。
gamecircle.Whispersync.GameDataStepDownTo(key)
字符串。 用于访问特定字符串集的键。
local gamecircle = require("plugin.gamecircle") gamecircle.Init(false, false, true) gamecircle.Whispersync.GameDataStepDownTo("Level 1") print("Level 1 Path: " .. gamecircle.Whispersync.CurrentDataMapGetPath()) gamecircle.Whispersync.GameDataStepDownTo("Treasures") gamecircle.Whispersync.GameDataStepUp() gamecircle.Whispersync.GameDataStepDownTo("Secrets") print("Secrets Path: " .. gamecircle.Whispersync.CurrentDataGetPath()) gamecircle.Whispersync.GameDataStepUp() print("Level 1 Children: ") local keys = gamecircle.Whispersync.CurrentDataMapChildKeys() for i,key in ipairs(keys) print("-" .. key) end gamecircle.Whispersync.GameDataReturnToRoot()