/spacey

To get this branch, use:
bzr branch /bzr/spacey

« back to all changes in this revision

Viewing changes to group.lua

  • Committer: Josh C
  • Date: 2013-05-13 21:31:23 UTC
  • Revision ID: josh@9ix.org-20130513213123-n21tkmyb2u7xcjtz
monkey patch group to add onRemove hook.  remove mirrors on remove.

Show diffs side-by-side

added added

removed removed

 
1
-- group monkey patch
 
2
 
 
3
local origRemove = Group.remove
 
4
 
 
5
function Group:remove(sprite)
 
6
   if sprite.onRemove then
 
7
      sprite:onRemove()
 
8
   end
 
9
 
 
10
   origRemove(self, sprite)
 
11
end
 
 
'\\ No newline at end of file'