WeakAuras.Mixin

This commit is contained in:
Bunny67
2020-09-06 11:33:12 +03:00
parent e9957582cb
commit 47e81f3d70
10 changed files with 48 additions and 30 deletions
+24
View File
@@ -1,3 +1,27 @@
local assert = assert
local ipairs = ipairs
local next = next
local pairs = pairs
local select = select
local function Mixin(object, ...)
for i = 1, select("#", ...) do
local mixin = select(i, ...);
for k, v in pairs(mixin) do
object[k] = v;
end
end
return object;
end
local function CreateFromMixins(...)
return Mixin({}, ...)
end
local function nop()
end
ObjectPoolMixin = {};
function ObjectPoolMixin:OnLoad(creationFunc, resetterFunc)