m
Move page script moved page Using OnUpdate correctly to WoW:Using OnUpdate correctly without leaving a redirect
m (Move page script moved page Using OnUpdate correctly to WoW:Using OnUpdate correctly without leaving a redirect) |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
This page is a guide on '''using OnUpdate correctly'''. | |||
== How Often Is It Called == | == How Often Is It Called == | ||
The game engine will call your OnUpdate function once each frame. This is (in most cases) extremely excessive. | The game engine will call your OnUpdate function once each frame. This is (in most cases) extremely excessive. | ||
| Line 17: | Line 19: | ||
<Scripts> | <Scripts> | ||
<OnLoad>self.TimeSinceLastUpdate = 0 </OnLoad> | <OnLoad>self.TimeSinceLastUpdate = 0 </OnLoad> | ||
<OnUpdate | <OnUpdate function="MyAddon_OnUpdate" /> | ||
</Scripts> | </Scripts> | ||
</Frame> | </Frame> | ||
| Line 53: | Line 55: | ||
end | end | ||
end | end | ||
[[Category:HOWTOs|Use OnUpdate Correctly]] | [[Category:HOWTOs|Use OnUpdate Correctly]] | ||