/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-30 21:40:21 UTC
  • Revision ID: josh@9ix.org-20130630214021-mw2vr14czefr09zb
set prices based on distance

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