API Functions/Callback2

Details could be found in "Red 5 Studios\Firefall\system\gui\lib\lib_Callback2.lua".

require "lib/lib_Callback2"; local UPDATE_INTERVAL = 1
 * Examples:

function ScheduledUpdate log("yay!"); end

-- repeat a ScheduledUpdate every UPDATE_INTERVAL CB = Callback2.CreateCycle(ScheduledUpdate, nil); CB:Run(UPDATE_INTERVAL);

-- another way to repeat when component load function OnComponentLoad if not updateTimer then updateTimer = Callback2.Create updateTimer:Bind(ScheduledUpdate) -- a function updateTimer:Schedule(UPDATE_INTERVAL) -- a constant we declared earlier end end