/traderous

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-06-19 00:50:23 UTC
  • Revision ID: josh@9ix.org-20130619005023-necyd2i8kgqbp1s9
shield

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
require 'boom'
19
19
require 'planet'
20
20
require 'trade_view'
 
21
require 'shield'
21
22
 
22
23
util = {
23
24
   signOf = function(value)
99
100
              the.player = SpacePlayer:new{x=the.bg.width / 2, y=the.bg.height / 2}
100
101
              self:add(the.player)
101
102
              self:add(the.player.thrust)
 
103
              self:add(the.player.shield)
102
104
 
103
105
              local e = Enemy:new{x=400, y=300}
104
106
              --local e = Enemy:new{x=the.bg.width / 2, y=the.bg.height / 2}
131
133
           end,
132
134
   onUpdate = function(self, dt)
133
135
                 the.bullets:collide(the.planets)
 
136
                 the.bullets:collide(the.player)
134
137
              end,
135
138
   onEndFrame = function(self)
136
139
                   the.interface.translate.x = the.player.x - the.app.width / 2 + the.player.width / 2