diff --git a/examples/empty_template/LICK/lib/hlpr.lua b/examples/empty_template/LICK/lib/hlpr.lua index 0529b09..13ded41 100644 --- a/examples/empty_template/LICK/lib/hlpr.lua +++ b/examples/empty_template/LICK/lib/hlpr.lua @@ -8,7 +8,16 @@ sin = math.sin deg = math.deg rad = math.rad +State = State or {} +function declare(t) + for i,v in pairs(t) do + if not State[i] then + State[i] = v + _G[i] = State[i] + end + end +end require "LICK/lib/color" module(...,package.seeall) diff --git a/examples/rotate/LICK/lib/hlpr.lua b/examples/rotate/LICK/lib/hlpr.lua index 7ed7b01..13ded41 100644 --- a/examples/rotate/LICK/lib/hlpr.lua +++ b/examples/rotate/LICK/lib/hlpr.lua @@ -8,7 +8,16 @@ sin = math.sin deg = math.deg rad = math.rad +State = State or {} +function declare(t) + for i,v in pairs(t) do + if not State[i] then + State[i] = v + _G[i] = State[i] + end + end +end require "LICK/lib/color" module(...,package.seeall) @@ -82,7 +91,6 @@ triangle = love.graphics.triangle - function color(r, g,b,a) local color={} local alpha=a or 255