/spacey

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

« back to all changes in this revision

Viewing changes to mirror.lua

  • Committer: Josh C
  • Date: 2013-05-04 20:47:29 UTC
  • Revision ID: josh@9ix.org-20130504204729-0g2wmw6k4nvsh58s
basecode main.lua

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'