/spacey

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

« back to all changes in this revision

Viewing changes to wrap_tile.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

78
78
                  -- die?
79
79
               end
80
80
            end,
 
81
   onRemove = function(self)
 
82
                 if self.xMirror then
 
83
                    the.app.view:remove(self.xMirror)
 
84
                 end
 
85
 
 
86
                 if self.yMirror then
 
87
                    the.app.view:remove(self.yMirror)
 
88
                 end
 
89
 
 
90
                 if self.xyMirror then
 
91
                    the.app.view:remove(self.xyMirror)
 
92
                 end
 
93
              end,
81
94
   update = function (self, elapsed)
82
95
               Tile.update(self, elapsed)
83
96