feat(P.2.6): migrate bindings to v0.2.0 string-keys
6 input.bind() calls migrated from engine.input.KEY_* integers to lowercase string-keys. Module is now engine.input.KEY_*-free (audit- I3 resolved). deps[]: lib-core.input version 0.1.0 → 0.2.0.
This commit is contained in:
14
init.lua
14
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()
|
||||
|
||||
@@ -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"}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user