企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[OnFinished(self, requested)](https://wow.gamepedia.com/UIHANDLER_OnFinished "UIHANDLER OnFinished"):当Animation或AnimationGroup完成时,将调用OnFinished处理程序。 * self:  完成的动画或动画组 * requested:  true if the Animation or AnimationGroup finished because of a call to self:Finish(), false otherwise ~~~ local fadeout = myFrame:CreateAnimationGroup() local anim = fadeout:CreateAnimation("Alpha") anim:SetDuration(.5) anim:SetChange(-myFrame:GetAlpha()) anim:SetOrder(1) fadeout:SetScript("OnFinished", function() myFrame:Hide() end) ~~~ [OnLoad](https://wow.gamepedia.com/UIHANDLER_OnLoad "UIHANDLER OnLoad"):创建框架时将调用OnLoad处理程序。 * self : Widget - newly-created frame. **细节** 通过Frame:SetScript设置的OnLoad处理程序将不会被调用。 OnLoad处理程序仅在通过XML设置(或从XML模板继承)时才有用,在这种情况下,它们在创建框架(及其所有子级)时执行。 如果Lua脚本需要类似的功能,只需在创建框架后在OnLoad处理程序中调用您希望调用的任何代码即可。 [OnLoop(self, loopState)](https://wow.gamepedia.com/UIHANDLER_OnLoop "UIHANDLER OnLoop"):当Animation或AnimationGroup完成一个循环周期时,将调用OnLoop处理程序(当动画组的循环状态更改时运行) * self: the Animation or AnimationGroup that finished * loopstate: the loop state that the animation is transitioning to [OnPause(self)](https://wow.gamepedia.com/index.php?title=UIHANDLER_OnPause&action=edit&redlink=1 "UIHANDLER OnPause (page does not exist)"):在动画(或动画组)暂停时运行 [OnPlay(self)](https://wow.gamepedia.com/index.php?title=UIHANDLER_OnPlay&action=edit&redlink=1 "UIHANDLER OnPlay (page does not exist)"):在动画(或动画组)开始播放时运行 [OnStop(self, requested)](https://wow.gamepedia.com/index.php?title=UIHANDLER_OnStop&action=edit&redlink=1 "UIHANDLER OnStop (page does not exist)"):在动画(或动画组)停止时运行。 [OnUpdate](https://wow.gamepedia.com/UIHANDLER_OnUpdate "UIHANDLER OnUpdate"):OnUpdate处理程序在每个帧被绘制之前(即在事件处理和用户操作之间,但在UI元素被绘制到屏幕上之前)被调用。对于声明OnUpdate处理程序的每个可见框架,都将调用它 * arg1 - The time (in seconds) since the last OnUpdate dispatch (I'm not sure if this is based on when the last dispatch run started or ended, or if it's maintained per frame). Also note that it does NOT include time spent zoning, only actual time spent looking at the world.