blob: 1035b05f403d21c35a6d3bea714202904d854c09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
game.keypressed = function(character, key, scancode, isrepeat)
isrepeat = true
if scancode == button.quit then
love.event.quit()
end
if scancode == button.a then
character.actionA = true
character.actionDown = false
character.actionUp = false
end
if scancode == button.left then
character.actionLeft = true
end
if scancode == button.right then
character.actionRight = true
end
if scancode == button.up and character.jump.isJumping == false then
character.actionUp = true
end
if scancode == button.down and character.jump.isJumping == false then
character.actionDown = true
end
end
|