View Single Post
04-06-13, 09:58 AM   #6
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
Originally Posted by Ailae View Post
I guess you could, but why would you?

You're creating a function just to call another function that does all the stuff (I presume). As long as your PVPSound table is local, the UpdateSoundEffectEngine function will also be local and you can set it as the script handler.

Lua Code:
  1. function PVPSound:UpdateSoundEffectEngine(elapsed)
  2. -- stuff goes on here
  3. end
  4.  
  5. PVPSoundEffectSoundEngineFrame:SetScript("OnUpdate", PVPSound.UpdateSoundEffectEngine)
Oh i see you can call it with "PVPSound.UpdateSoundEffectEngine" have no clue why did i wanted to call it with "PVPSound:UpdateSoundEffectEngine".

Well the PVPSound table is a local, but its a namespace shared local between my addon's files.
  Reply With Quote