rename addPhysicsWorld (has nothing to do with physics)
This commit is contained in:
parent
8ad931f33b
commit
eb7ce44fa1
2 changed files with 3 additions and 3 deletions
|
|
@ -55,9 +55,9 @@ function Area:addGameObject(game_object_type, x, y, opts)
|
||||||
return game_object
|
return game_object
|
||||||
end
|
end
|
||||||
|
|
||||||
---Initializes HC physics as a world
|
---Initializes HC collision manager as a world
|
||||||
---@param cell_size number|nil
|
---@param cell_size number|nil
|
||||||
function Area:addPhysicsWorld(cell_size)
|
function Area:addCollisionManager(cell_size)
|
||||||
self.world = HC(cell_size or 100)
|
self.world = HC(cell_size or 100)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ local Stage = Room:extend()
|
||||||
|
|
||||||
function Stage:new()
|
function Stage:new()
|
||||||
Stage.super.new(self)
|
Stage.super.new(self)
|
||||||
self.area:addPhysicsWorld()
|
self.area:addCollisionManager()
|
||||||
self.area:addGameObject('Player', gw/2, gh/2)
|
self.area:addGameObject('Player', gw/2, gh/2)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue