Difference between revisions of "Tactile"
(Adding keyword.) |
m (Added: Other Languages) |
||
Line 21: | Line 21: | ||
end | end | ||
</source> | </source> | ||
− | |||
− | |||
{{#set:LOVE Version=0.10.x}} | {{#set:LOVE Version=0.10.x}} | ||
{{#set:Description=A flexible and nice input library.}} | {{#set:Description=A flexible and nice input library.}} | ||
{{#set:Keyword=Input}} | {{#set:Keyword=Input}} | ||
+ | [[Category:Libraries]] | ||
+ | == Other Languages == | ||
+ | {{i18n|Tactile}} |
Latest revision as of 14:26, 15 December 2019
Tactile is a flexible and straightforward input library for LÖVE to help you manage multiple input sources. Get the code on GitHub.
Control = {
Horizontal = tactile.newControl()
:addAxis(tactile.gamepadAxis(1, 'leftx'))
:addButtonPair(tactile.keys 'left', tactile.keys 'right'),
Fire = tactile.newControl()
:addButton(tactile.gamepadButtons(1, 'a'))
:addButton(tactile.keys 'x')
}
function love.update(dt)
Control.Horizontal:update()
Control.Fire:update()
player.x = player.x + player.speed * Control.Horizontal() * dt
if Control.Fire:isDown() then
player:shoot()
end
end
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info