diff options
author | Aki <nthirtyone@gmail.com> | 2016-05-17 20:35:45 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-05-17 20:35:45 +0200 |
commit | bd051a865018b317db33e1432161a83f2ba84326 (patch) | |
tree | 28f267340685b870ba757a766eee79dfdb0ed41e | |
parent | 92d30034354751296ff51cb86635d0203bca2c8b (diff) | |
download | roflnauts-bd051a865018b317db33e1432161a83f2ba84326.zip roflnauts-bd051a865018b317db33e1432161a83f2ba84326.tar.gz roflnauts-bd051a865018b317db33e1432161a83f2ba84326.tar.bz2 |
Here too
-rw-r--r-- | player.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |