Thread:wait_frame

Blocks this thread until the next Script:update call.

Usage

thread:wait_frame()

Examples

local script = crystal.Script:new();

script:add_thread(function(self)
  while true do
    print(self:time());
    self:wait_frame();
  end
end);

script:update(0.1); -- Prints 0.1
script:update(0.1); -- Prints 0.2
script:update(0.1); -- Prints 0.3

This site uses Just the Docs, a documentation theme for Jekyll.