/traderous

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

« back to all changes in this revision

Viewing changes to wrap_tile.lua

  • Committer: Josh C
  • Date: 2013-05-13 21:25:26 UTC
  • Revision ID: josh@9ix.org-20130513212526-3q6md6n9xzhcmoa6
and that fixes the corner bug

Show diffs side-by-side

added added

removed removed

60
60
                  self.yMirror = nil
61
61
                  -- die?
62
62
               end
 
63
 
 
64
               if self.x ~= mirrorX and self.y ~= mirrorY then
 
65
                  if not self.xyMirror then
 
66
                     --print('creating mirror: X='..xyMirrorX..' Y='..xyMirrorY)
 
67
 
 
68
                     self.xyMirror = Tile:new{ image = self.image }
 
69
                     the.app.view:add(self.xyMirror)
 
70
                  end
 
71
 
 
72
                  self.xyMirror.x = mirrorX
 
73
                  self.xyMirror.y = mirrorY
 
74
                  self.xyMirror.rotation = self.rotation
 
75
               elseif self.xyMirror then
 
76
                  the.app.view:remove(self.xyMirror)
 
77
                  self.xyMirror = nil
 
78
                  -- die?
 
79
               end
63
80
            end,
64
81
   update = function (self, elapsed)
65
82
               Tile.update(self, elapsed)