diff --git a/init.lua b/init.lua index a8df3ff..e44e372 100644 --- a/init.lua +++ b/init.lua @@ -16,13 +16,13 @@ local map_center_y = (m_size.h * t_size) / 2 camera.set_target(map_center_x, map_center_y) camera.set_zoom(1.0) --- Bind input actions -input.bind("quit", { engine.input.KEY_ESCAPE }) -input.bind("move_left", { engine.input.KEY_A, engine.input.KEY_LEFT }) -input.bind("move_right", { engine.input.KEY_D, engine.input.KEY_RIGHT }) -input.bind("move_up", { engine.input.KEY_W, engine.input.KEY_UP }) -input.bind("move_down", { engine.input.KEY_S, engine.input.KEY_DOWN }) -input.bind("interact", { engine.input.KEY_E }) +-- Bind input actions (string-key-names per lib-core.input v0.2.0) +input.bind("quit", { "escape" }) +input.bind("move_left", { "a", "left" }) +input.bind("move_right", { "d", "right" }) +input.bind("move_up", { "w", "up" }) +input.bind("move_down", { "s", "down" }) +input.bind("interact", { "e" }) -- Configure player: defaults are 24x24 + 200 px/sec; place at map-center local p_size = player.size() diff --git a/manifest.module b/manifest.module index 0bd0f76..90e633f 100644 --- a/manifest.module +++ b/manifest.module @@ -8,7 +8,7 @@ {"id":"lib-core.maps","version":"0.1.0"}, {"id":"lib-core.render","version":"0.1.0"}, {"id":"lib-core.camera","version":"0.1.0"}, - {"id":"lib-core.input","version":"0.1.0"}, + {"id":"lib-core.input","version":"0.2.0"}, {"id":"lib-core.player_control","version":"0.1.0"}, {"id":"lib-core.interaction","version":"0.1.0"} ]