mirror of
https://github.com/vrld/HC.git
synced 2024-12-08 15:04:23 +00:00
Silly me, Lua doesn't work this way
This commit is contained in:
parent
956df262d5
commit
ab08c5744b
9
init.lua
9
init.lua
@ -51,7 +51,14 @@ local HC = Class{name = "HardonCollider", function(self, cell_size, callback_col
|
|||||||
end}
|
end}
|
||||||
|
|
||||||
function HC:clear()
|
function HC:clear()
|
||||||
self = HC(self.hash.cell_size, self.on_collide, self.on_stop)
|
self._active_shapes = {}
|
||||||
|
self._passive_shapes = {}
|
||||||
|
self._ghost_shapes = {}
|
||||||
|
self._current_shape_id = 0
|
||||||
|
self._shape_ids = setmetatable({}, {__mode = "k"}) -- reverse lookup
|
||||||
|
self.groups = {}
|
||||||
|
self._colliding_last_frame = {}
|
||||||
|
self._hash = Spatialhash(self.hash.cell_size)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user