Difference between revisions of "Talk:Lua API:Elements"

From The Powder Toy
Jump to: navigation, search
(Enter a short summary [alt-b])
 
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
end
 
end
  
local function funcGraphics()
+
local function funcGraphics(i, colr, colg, colb)
  
 
end
 
end
 +
 +
 +
 
elements.property(ELEM, "Update", funcUpdate)
 
elements.property(ELEM, "Update", funcUpdate)
 +
 
elements.property(ELEM, "Graphics", funcGraphics)
 
elements.property(ELEM, "Graphics", funcGraphics)
  
 
--[[User:ChargedCreeper|ChargedCreeper]] 16:26, 4 May 2015 (BST)
 
--[[User:ChargedCreeper|ChargedCreeper]] 16:26, 4 May 2015 (BST)

Latest revision as of 15:45, 4 May 2015

You do not have to use the legacy API for an update function. Same for the graphics function.

local function funcUpdate(i,x,y,s,nt)

end

local function funcGraphics(i, colr, colg, colb)

end


elements.property(ELEM, "Update", funcUpdate)

elements.property(ELEM, "Graphics", funcGraphics)

--ChargedCreeper 16:26, 4 May 2015 (BST)