summaryrefslogtreecommitdiffhomepage
path: root/player.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-05-17 20:35:45 +0200
committerAki <nthirtyone@gmail.com>2016-05-17 20:35:45 +0200
commitbd051a865018b317db33e1432161a83f2ba84326 (patch)
tree28f267340685b870ba757a766eee79dfdb0ed41e /player.lua
parent92d30034354751296ff51cb86635d0203bca2c8b (diff)
downloadroflnauts-bd051a865018b317db33e1432161a83f2ba84326.zip
roflnauts-bd051a865018b317db33e1432161a83f2ba84326.tar.gz
roflnauts-bd051a865018b317db33e1432161a83f2ba84326.tar.bz2
Here too
Diffstat (limited to 'player.lua')
-rw-r--r--player.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/player.lua b/player.lua
index ab7e739..8ff100d 100644
--- a/player.lua
+++ b/player.lua
@@ -135,7 +135,7 @@ function Player:keypressed (key)
-- Jumping
if key == self.key_jump then
if not self.inAir then
- w:createEffectBottom("jump", self.body:getX()-12, self.body:getY()-15)
+ w:createEffect("jump", self.body:getX()-12, self.body:getY()-15)
self.jumpactive = true
if (self.current == self.animations.attack) or
(self.current == self.animations.attack_up) or
@@ -143,7 +143,7 @@ function Player:keypressed (key)
self:changeAnimation("idle")
end
elseif self.jumpdouble then
- w:createEffectBottom("doublejump", self.body:getX()-12, self.body:getY()-15)
+ w:createEffect("doublejump", self.body:getX()-12, self.body:getY()-15)
self.jumpactive = true
self.jumpdouble = false
end
@@ -254,6 +254,7 @@ end
-- Taking damage of `Player` by successful hit test
function Player:damage (horizontal, vertical)
+ w:createEffect("hit", self.body:getX()-4, self.body:getY()-7)
self.body:applyLinearImpulse((34+12*self.combo)*horizontal, (50+10*self.combo)*vertical + 15)
self:changeAnimation("damage")
end \ No newline at end of file