examples/plateformer : make the character clone its sprite

This commit is contained in:
Kazhnuz 2019-05-05 13:18:06 +02:00
parent 8d655f8049
commit 8445dd2e84

View file

@ -4,6 +4,7 @@ local Player = Base:extend()
function Player:new(world, x, y, id) function Player:new(world, x, y, id)
Player.super.new(self, world, "player", x, y, 16, 24, true) Player.super.new(self, world, "player", x, y, 16, 24, true)
self:setSprite("player", 8, 12) self:setSprite("player", 8, 12)
self:cloneSprite()
self:setYGravity(480) self:setYGravity(480)
end end