diff --git a/tests/bowling.lua b/tests/bowling.lua index 4f3f3dd..e134bc2 100644 --- a/tests/bowling.lua +++ b/tests/bowling.lua @@ -41,6 +41,17 @@ function mousebutton_down_event(button) end end +function key_down_event(key) + if (key == "s") then + local s = ag.createSphere(0.5) + s:setPosition(0, 0, 5) + s:setColor(0.1, 0.2, 0.3) + elseif (key == "c") then + local c = ag.loadModel("crate") + c:setPosition(-3, -3, 5) + end +end + --function update_overlay_event(width, height) -- local tw, th = ag.getTextSize("Hi there", 18) -- ag.drawText("Hi there", 1, 1, 1, 18, width - tw - 4, height - th - 4)