couch-rust/main.lua

15 lines
415 B
Lua
Raw Normal View History

2022-04-09 12:42:18 -05:00
print("Hello from a lua script!")
2022-04-11 16:14:09 -05:00
function init()
print("Hello from \"init\"")
couch.debug("init")
2022-04-11 17:41:18 -05:00
couch.say_hello("dane", "Hi!")
2022-04-11 16:14:09 -05:00
end
function update(delta)
2022-04-15 17:51:26 -05:00
local transform = couch.root:find_node("cube"):get_transform()
transform.rotation[2] = transform.rotation[2] + delta
transform.rotation[1] = transform.rotation[1] - delta * 0.3
couch.root:find_node("cube"):set_transform(transform)
2022-04-11 16:14:09 -05:00
end