/traderous

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

« back to all changes in this revision

Viewing changes to mirror.lua

  • Committer: Josh C
  • Date: 2013-06-23 02:52:56 UTC
  • Revision ID: josh@9ix.org-20130623025256-o80jq1o3hy8dw7lh
available cargo space

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Mirror = Tile:extend {
 
2
   onNew = function(self)
 
3
              self.image = self.image or self.of.image
 
4
           end,
 
5
   onUpdate = function(self, dt)
 
6
                 if DEBUG and the.console.visible then
 
7
                    if not self.text then
 
8
                       self.text = Text:new()
 
9
                       the.view:add(self.text)
 
10
                    end
 
11
 
 
12
                    if self.of.text then
 
13
                       self.text.text = 'mirror ' .. self.of.text.text
 
14
                       self.text.x, self.text.y = self.x, self.y
 
15
                       self.text.visible = true
 
16
                    end
 
17
                 else
 
18
                    if self.text then
 
19
                       self.text.visible = false
 
20
                    end
 
21
                 end
 
22
 
 
23
              end
 
24
}
 
 
b'\\ No newline at end of file'