/spacey

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

« back to all changes in this revision

Viewing changes to mirror.lua

  • Committer: Josh C
  • Date: 2013-05-14 00:15:01 UTC
  • Revision ID: josh@9ix.org-20130514001501-z14e702ncp21s0yr
try to not spawn rocks where you can see them.  not working if screen 
crosses game boundaries.

Show diffs side-by-side

added added

removed removed

 
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
}
 
 
'\\ No newline at end of file'