summaryrefslogtreecommitdiffhomepage
path: root/player.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-01-14 21:24:10 +0100
committerAki <nthirtyone@gmail.com>2017-01-14 21:24:10 +0100
commit0fe43d48f152659e638b88406d9e5e8a872f1195 (patch)
tree5d944b6f337074f9fe1537c86862c21ab0dca1c8 /player.lua
parent84f7df839be061fca91af78d72f7c8c222885eb1 (diff)
downloadroflnauts-0fe43d48f152659e638b88406d9e5e8a872f1195.zip
roflnauts-0fe43d48f152659e638b88406d9e5e8a872f1195.tar.gz
roflnauts-0fe43d48f152659e638b88406d9e5e8a872f1195.tar.bz2
Added short descriptions for chosen new functions
Diffstat (limited to 'player.lua')
-rw-r--r--player.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/player.lua b/player.lua
index f4f97d0..5c7572f 100644
--- a/player.lua
+++ b/player.lua
@@ -377,7 +377,8 @@ function Player:createEffect(name)
end
-- Punch of `Player`
--- (string) direction
+-- direction: left, right, up, down
+-- creates temporary fixture for player's body that acts as sensor; fixture is deleted after time set in UserData[1]; deleted by Player:update(dt)
function Player:hit(direction)
-- start cooldown
self.punchcd = Player.punchcd -- INITIAL from metatable
@@ -405,6 +406,7 @@ function Player:hit(direction)
end
-- Taking damage of `Player` by successful hit test
+-- currently called from World's startContact
function Player:damage(direction)
local horizontal, vertical = 0, 0
if direction == "left" then