blob: 8d5f3531811927089afd90ebf7b1aa97cdf09491 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
local glfw = honey.glfw
return function(entities, id, data)
if data.action == glfw.PRESS then
if data.key == glfw.KEY_ESCAPE then
data.window:setShouldClose(true)
elseif data.key == glfw.KEY_SPACE then
entities:save("save")
elseif data.key == glfw.KEY_L then
entities:load("save")
end
end
end
|