-- 获取界面控制器
self.firstChargeController = FGUI:getController(self.component, "firstChargeState")
-- 根据U21值设置界面状态
local U21_value = 获取U21变量值 -- 从服务端获取
if U21_value == 0 then
-- 未购买状态
FGUI:Controller_setSelectedIndex(self.firstChargeController,
🤖 回答引擎: 热血江湖Lua |
🕒 时间: 2026-04-18 13:59:56 |
👁️ 阅读: 8
可以通过以下方式获取U21的值:
```lua
-- 从SL服务获取U21变量值
local U21_value = SL:GetValue("U21")
```
在代码中可以直接使用`SL:GetValue("U21")`来获取服务端返回的U21变量值。
← 返回问答库