/traderous

To get this branch, use:
bzr branch http://9ix.org/bzr/traderous

« back to all changes in this revision

Viewing changes to wrap_tile.lua

  • Committer: Josh C
  • Date: 2013-05-14 17:49:03 UTC
  • Revision ID: josh@9ix.org-20130514174903-790agtxqfvz8lnzv
player death

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
                     --print('creating mirror: X='..xMirrorX..' Y='..xMirrorY)
33
33
 
34
34
                     self.xMirror = Mirror:new{ of = self, image = self.image }
35
 
                     the.mirrors:add(self.xMirror)
 
35
                     the.app.view:add(self.xMirror)
36
36
                  end
37
37
 
38
38
                  self.xMirror.x = mirrorX
40
40
                  self.xMirror.rotation = self.rotation
41
41
                  self.xMirror.scale = self.scale
42
42
               elseif self.xMirror then
43
 
                  the.mirrors:remove(self.xMirror)
 
43
                  the.app.view:remove(self.xMirror)
44
44
                  self.xMirror = nil
45
45
                  -- die?
46
46
               end
50
50
                     --print('creating mirror: X='..yMirrorX..' Y='..yMirrorY)
51
51
 
52
52
                     self.yMirror = Mirror:new{ of = self, image = self.image }
53
 
                     the.mirrors:add(self.yMirror)
 
53
                     the.app.view:add(self.yMirror)
54
54
                  end
55
55
 
56
56
                  self.yMirror.x = self.x
58
58
                  self.yMirror.rotation = self.rotation
59
59
                  self.yMirror.scale = self.scale
60
60
               elseif self.yMirror then
61
 
                  the.mirrors:remove(self.yMirror)
 
61
                  the.app.view:remove(self.yMirror)
62
62
                  self.yMirror = nil
63
63
                  -- die?
64
64
               end
68
68
                     --print('creating mirror: X='..xyMirrorX..' Y='..xyMirrorY)
69
69
 
70
70
                     self.xyMirror = Mirror:new{ of = self, image = self.image }
71
 
                     the.mirrors:add(self.xyMirror)
 
71
                     the.app.view:add(self.xyMirror)
72
72
                  end
73
73
 
74
74
                  self.xyMirror.x = mirrorX
76
76
                  self.xyMirror.rotation = self.rotation
77
77
                  self.xyMirror.scale = self.scale
78
78
               elseif self.xyMirror then
79
 
                  the.mirrors:remove(self.xyMirror)
 
79
                  the.app.view:remove(self.xyMirror)
80
80
                  self.xyMirror = nil
81
81
                  -- die?
82
82
               end
83
83
            end,
84
84
   onRemove = function(self)
85
85
                 if self.xMirror then
86
 
                    the.mirrors:remove(self.xMirror)
 
86
                    the.app.view:remove(self.xMirror)
87
87
                 end
88
88
 
89
89
                 if self.yMirror then
90
 
                    the.mirrors:remove(self.yMirror)
 
90
                    the.app.view:remove(self.yMirror)
91
91
                 end
92
92
 
93
93
                 if self.xyMirror then
94
 
                    the.mirrors:remove(self.xyMirror)
 
94
                    the.app.view:remove(self.xyMirror)
95
95
                 end
96
96
              end,
97
97
   update = function (self, elapsed)