From 0fe43d48f152659e638b88406d9e5e8a872f1195 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 14 Jan 2017 21:24:10 +0100 Subject: Added short descriptions for chosen new functions --- player.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.1