/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 01:11:27 UTC
  • Revision ID: josh@9ix.org-20130626011127-7e7z5ed0r0xmtva3
show planet labels, get better names

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
require 'trade_view'
21
21
require 'shield'
22
22
require 'pause_view'
 
23
require 'game_over'
 
24
require 'names'
23
25
 
24
26
util = {
25
27
   signOf = function(value)
43
45
              the.bullets = Group:new()
44
46
              the.interface = Group:new()
45
47
              the.planets = Group:new()
 
48
              the.planetLabels = Group:new()
46
49
              the.indicators = Group:new()
47
50
              the.enemies = Group:new()
48
51
 
71
74
                                    x = planet.x,
72
75
                                    y = planet.y,
73
76
                                    rotation = planet.rotation,
74
 
                                    goods = planet.goods
 
77
                                    goods = planet.goods,
 
78
                                    name = planet.name
75
79
                                 })
76
80
                 end
77
81
 
100
104
              end
101
105
 
102
106
              self:add(the.planets)
 
107
              self:add(the.planetLabels)
103
108
 
104
109
              self:add(the.player)
105
110
              self:add(the.player.thrust)
123
128
              the.cursor = Cursor:new()
124
129
              self:add(the.cursor)
125
130
 
126
 
              the.over = Text:new{
127
 
                 y = the.app.height / 2,
128
 
                 width = the.app.width,
129
 
                 align = 'center',
130
 
                 font = 25,
131
 
                 text = "Game Over",
132
 
                 visible = false
133
 
              }
134
 
              the.interface:add(the.over)
135
 
 
136
 
 
137
 
              the.instructions = Text:new{
138
 
                 y = the.app.height / 2 + 32,
139
 
                 width = the.app.width,
140
 
                 align = 'center',
141
 
                 font = 12,
142
 
                 text = "Press Enter to start a new game\nPress Q to quit",
143
 
                 visible = false
144
 
              }
145
 
              the.interface:add(the.instructions)
146
 
 
147
131
              love.mouse.setGrab(true)
148
132
              love.mouse.setVisible(false)
149
133
              love.mouse.setPosition(the.app.width / 2, the.app.height / 2)