modules/world: init fake keys for every actor

Only the "player object" will get the real inputs
This commit is contained in:
Kazhnuz 2019-04-07 17:03:18 +02:00
parent 54d56675a9
commit b74be06d26

View file

@ -8,9 +8,14 @@ function Actor2D:new(world, type, x, y, w, h)
self.h = h or 0 self.h = h or 0
self.type = type or "" self.type = type or ""
self:initKeys()
self:register() self:register()
end end
function Actor2D:initKeys()
self.keys = core.input.fakekeys
end
function Actor2D:register() function Actor2D:register()
self.world:registerActor(self) self.world:registerActor(self)
end end