modules/world: init fake keys for every actor
Only the "player object" will get the real inputs
This commit is contained in:
parent
54d56675a9
commit
b74be06d26
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue