Here's an example of a simplified lua implementation w/o xml-templates. A simple statusbar constructor, based on existing functions from StatusBar.lua.
Ofc you'll have to add some other code, cuz I dun intend to write everything for ya
Lua Code:
local function CreateAnimatedStatusBar(parent, ...)
local bar = CreateFrame("StatusBar", "$parentStatusBar", parent)
local fill = bar:CreateTexture(nil, "ARTWORK")
fill:SettAllPoints(bar:GetStatusBarTexture())
fill:SetTexture("Interface\\AddOns\\SyncUI\\Media\\Textures\\Elements\\Statusbar\\StatusBar_Animated_Fluid")
bar.Fill = fill
tinsert(framesToAnimate, bar)
return bar
end
local AnimationController = CreateFrame("Frame")
AnimationController:SetScript("OnUpdate", SyncUI_AnimatedStatusBarFrame_OnUpdate)
Then you spawn statusbars like so:
Lua Code:
local healthbar = CreateAnimatedStatusBar(your_unit_frame)