modules/world: init hitbox before loading the parent new() function

This commit is contained in:
Kazhnuz 2019-05-05 21:55:57 +02:00
parent 2344bd5a9a
commit de42087e51

View file

@ -30,8 +30,8 @@ local Actor2D = BaseActor:extend()
-- Initialise the actor and its base functions
function Actor2D:new(world, type, x, y, w, h, isSolid)
Actor2D.super.new(self, world, type, isSolid)
self:initHitbox(x, y, w, h)
Actor2D.super.new(self, world, type, isSolid)
self:initPhysics()
self:register()
end