Skip to content

Commit

Permalink
Silly me, Lua doesn't work this way
Browse files Browse the repository at this point in the history
  • Loading branch information
vrld committed Nov 13, 2011
1 parent 956df26 commit ab08c57
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ local HC = Class{name = "HardonCollider", function(self, cell_size, callback_col
end}

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
end

Expand Down

0 comments on commit ab08c57

Please sign in to comment.