modules/world: put the register and initPhysics functions in BaseActor
This commit is contained in:
parent
de42087e51
commit
0ee3220559
2 changed files with 2 additions and 2 deletions
|
@ -32,8 +32,6 @@ local Actor2D = BaseActor:extend()
|
|||
function Actor2D:new(world, type, x, y, w, h, isSolid)
|
||||
self:initHitbox(x, y, w, h)
|
||||
Actor2D.super.new(self, world, type, isSolid)
|
||||
self:initPhysics()
|
||||
self:register()
|
||||
end
|
||||
|
||||
-- MOVEMENT FUNCTIONS
|
||||
|
|
|
@ -38,8 +38,10 @@ function BaseActor:new(world, type, isSolid)
|
|||
self:initKeys()
|
||||
self:initTimers()
|
||||
self:setSprite()
|
||||
self:initPhysics()
|
||||
|
||||
self:setDebugColor(1, 1, 1)
|
||||
self:register()
|
||||
end
|
||||
|
||||
function BaseActor:setManagers(world)
|
||||
|
|
Loading…
Reference in a new issue