modules/world: put the register and initPhysics functions in BaseActor

This commit is contained in:
Kazhnuz 2019-05-05 21:56:55 +02:00
parent de42087e51
commit 0ee3220559
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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)