/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-25 19:56:26 UTC
  • Revision ID: josh@9ix.org-20130625195626-00x63mxdyk1k6ud7
last fix for saving

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'
25
23
 
26
24
util = {
27
25
   signOf = function(value)
45
43
              the.bullets = Group:new()
46
44
              the.interface = Group:new()
47
45
              the.planets = Group:new()
48
 
              the.planetLabels = Group:new()
49
46
              the.indicators = Group:new()
50
47
              the.enemies = Group:new()
51
48
 
74
71
                                    x = planet.x,
75
72
                                    y = planet.y,
76
73
                                    rotation = planet.rotation,
77
 
                                    goods = planet.goods,
78
 
                                    name = planet.name
 
74
                                    goods = planet.goods
79
75
                                 })
80
76
                 end
81
77
 
104
100
              end
105
101
 
106
102
              self:add(the.planets)
107
 
              self:add(the.planetLabels)
108
103
 
109
104
              self:add(the.player)
110
105
              self:add(the.player.thrust)
128
123
              the.cursor = Cursor:new()
129
124
              self:add(the.cursor)
130
125
 
 
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
 
131
147
              love.mouse.setGrab(true)
132
148
              love.mouse.setVisible(false)
133
149
              love.mouse.setPosition(the.app.width / 2, the.app.height / 2)