/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-11 00:15:54 UTC
  • Revision ID: josh@9ix.org-20130611001554-tkzp73ke16buhnuy
bring indicators a little closer from edge

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
require 'bullet'
17
17
require 'rock'
18
18
require 'boom'
19
 
require 'planet'
20
 
require 'trade_view'
21
19
 
22
20
util = {
23
21
   signOf = function(value)
111
109
              self:add(the.planets)
112
110
 
113
111
              --the.player = CrystalPlayer:new{x=400,y=300}
114
 
              the.player = SpacePlayer:new{x=the.bg.width / 2, y=the.bg.height / 2}
 
112
              the.player = SpacePlayer:new{x=1366,y=768}
115
113
              self:add(the.player)
116
114
              self:add(the.player.thrust)
117
115
 
125
123
              self:add(the.interface)
126
124
 
127
125
              for _ = 1, math.random(6) do
128
 
                 local planet = Planet:new{
 
126
                 local planet = Tile:new{
 
127
                    image = 'data/planet1.png',
129
128
                    x = math.random(the.app.width / 2,
130
129
                                    the.bg.width - the.app.width / 2),
131
130
                    y = math.random(the.app.height / 2,
133
132
                    rotation = math.random() * math.pi
134
133
                 }
135
134
                 the.planets:add(planet)
 
135
 
 
136
                 planet.indicator = Tile:new{
 
137
                    image = 'data/planet1ind.png',
 
138
                 }
 
139
                 the.indicators:add(planet.indicator)
136
140
              end
137
141
 
138
142
              the.cursor = Cursor:new()