/spacey

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

« back to all changes in this revision

Viewing changes to rock.lua

  • Committer: Josh C
  • Date: 2013-05-20 16:51:19 UTC
  • Revision ID: josh@9ix.org-20130520165119-mkjh7d9408e6ig0u
extract updating score.  update score again when you calc high score - 
should mitigate a bug I saw happen when thor played that put final score 
+ high score out of sync

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
                 rock = self
14
14
              }
15
15
 
16
 
              the.app.view:add(self.collider)
17
16
              the.rockColliders:add(self.collider)
18
17
           end,
19
18
   onUpdate = function(self, dt)
58
57
                     }
59
58
                     the.app.view:add(b)
60
59
 
61
 
                     the.app.view:remove(self.rock)
62
 
                     the.app.view:remove(self)
 
60
                     the.rocks:remove(self.rock)
63
61
                     the.rockColliders:remove(self)
64
62
                     self.rock = nil -- break circular reference
65
63
 
66
 
                     the.app.view:remove(other)
67
64
                     the.bullets:remove(other)
 
65
                     other:die()
68
66
                  end
69
67
               end
70
68
}
 
 
b'\\ No newline at end of file'