/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-26 00:45:08 UTC
  • Revision ID: josh@9ix.org-20130626004508-6in13i6vjpu77els
give planets names

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
require 'shield'
22
22
require 'pause_view'
23
23
require 'game_over'
24
 
require 'names'
25
 
require 'good'
26
24
 
27
25
util = {
28
26
   signOf = function(value)
46
44
              the.bullets = Group:new()
47
45
              the.interface = Group:new()
48
46
              the.planets = Group:new()
49
 
              the.planetLabels = Group:new()
50
47
              the.indicators = Group:new()
51
48
              the.enemies = Group:new()
52
49
 
80
77
                                 })
81
78
                 end
82
79
 
83
 
                 Good:stockPlanets()
84
 
 
85
80
                 -- build fresh player
86
81
                 local player = SpacePlayer:new{x=the.bg.width / 2, y=the.bg.height / 2}
87
82
                 the.player = player
107
102
              end
108
103
 
109
104
              self:add(the.planets)
110
 
              self:add(the.planetLabels)
111
105
 
112
106
              self:add(the.player)
113
107
              self:add(the.player.thrust)
189
183
                 self.console:watch('num rocks', '#the.rocks.sprites')
190
184
                 self.console:watch('num planets', '#the.planets.sprites')
191
185
                 self.console:watch('num enemies', 'the.enemies:count()')
192
 
                 self.console:watch('onPlanet', 'the.player.onPlanet')
193
186
                 --self.console:watch('drawTook', 'the.drawTook')
194
187
 
195
188
                 -- back off that dark overlay a bit