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.type = type or ""
|
||||
|
||||
self:initKeys()
|
||||
self:register()
|
||||
end
|
||||
|
||||
function Actor2D:initKeys()
|
||||
self.keys = core.input.fakekeys
|
||||
end
|
||||
|
||||
function Actor2D:register()
|
||||
self.world:registerActor(self)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue