bevy_scriptum/assets/examples/lua/call_function_from_rust.lua
Jarosław Konik 6726e40768
Lua support (#16)
* adds Lua language support
* makes the library generic, allowing for easy extension for more languages
* small improvements and fixes
2024-06-16 07:06:09 +02:00

13 lines
251 B
Lua

local my_state = {
iterations = 0,
}
function on_update()
my_state.iterations = my_state.iterations + 1;
print("on_update called " .. my_state.iterations .. " times")
if my_state.iterations >= 10 then
print("calling quit");
quit();
end
end