Lua接口/客户端/SetTimer:修订间差异
来自天龙知识库
跳到导航跳到搜索
新建客户端 Lua 接口页:全局函数、对象方法、窗口操作与客户端事件 |
新建客户端 Lua 接口页:全局函数、对象方法、窗口操作与客户端事件 |
||
| 第7行: | 第7行: | ||
<div style="margin-top:6px;color:#657078;">实现体未体现明确的外部效果 · 实现于 Game/Script/GMUITimer.cpp</div> | <div style="margin-top:6px;color:#657078;">实现体未体现明确的外部效果 · 实现于 Game/Script/GMUITimer.cpp</div> | ||
</div> | </div> | ||
== 调用方式 == | == 调用方式 == | ||
<code style="white-space:normal;overflow-wrap:anywhere;">SetTimer(string, string, number)</code> | <code style="white-space:normal;overflow-wrap:anywhere;">SetTimer(string, string, number)</code> | ||
| 第55行: | 第54行: | ||
</div> | </div> | ||
2026年9月19日 (六) 13:37的版本
SetTimer
实现体未体现明确的外部效果 · 实现于 Game/Script/GMUITimer.cpp
调用方式
SetTimer(string, string, number)
作为全局函数直接按名称调用。
界面脚本中共 12 处调用,实参个数出现过:3 个(12 处)。
参数
| 序号 | 类型 | 说明 |
|---|---|---|
| 1 | string
|
调用点实参:"PetFriendSearch"(4 处)、"PetZhengYou"(4 处)、"PlayerFrame"(2 处)
|
| 2 | string
|
调用点实参:"MiniMap_TimerProc()"(1 处)、"PetFriendSearch_CoolDown3();"(1 处)、"PetFriendSearch_CoolDown4();"(1 处)
|
| 3 | number
|
调用点实参:cooldownTime(4 处)、pageCoolDownTime(4 处)、5000(1 处)
|
返回值
返回 1 个值。
脚本中的调用
以下是界面脚本里的真实调用点(同一形态只列一次):
-- ChatFrame/ChatFrame.lua
SetTimer("ChatFrame", "StopFlashCityChannel()", 5000)
-- MiniMap/MiniMap.lua
SetTimer("MiniMap", "MiniMap_TimerProc()", 60000)
-- PetFriendSearch/PetFriendSearch.lua
SetTimer("PetFriendSearch", "PetFriendSearch_CoolPageUp();", pageCoolDownTime)
-- PetFriendSearch/PetFriendSearch.lua
SetTimer("PetFriendSearch", "PetFriendSearch_CoolPageDown();", pageCoolDownTime)
-- PetFriendSearch/PetFriendSearch.lua
SetTimer("PetFriendSearch", "PetFriendSearch_CoolDown3();", cooldownTime)
-- PetFriendSearch/PetFriendSearch.lua
SetTimer("PetFriendSearch", "PetFriendSearch_CoolDown4();", cooldownTime)
-- PetZhengYou/PetZhengYou.lua
SetTimer("PetZhengYou", "PetZhengYou_CoolPageUp();", pageCoolDownTime)