/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 21:50:05 UTC
  • Revision ID: josh@9ix.org-20130625215005-3bdnmv9avkfo1a36
because it's funny

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'
23
24
 
24
25
util = {
25
26
   signOf = function(value)
94
95
 
95
96
                 -- load player with cargo, money, position
96
97
                 the.player = SpacePlayer:new(the.storage.data.player)
 
98
 
 
99
                 -- reload storage as we've turned it all into objects
 
100
                 the.storage:load()
97
101
              end
98
102
 
99
103
              self:add(the.planets)
120
124
              the.cursor = Cursor:new()
121
125
              self:add(the.cursor)
122
126
 
123
 
              the.over = Text:new{
124
 
                 y = the.app.height / 2,
125
 
                 width = the.app.width,
126
 
                 align = 'center',
127
 
                 font = 25,
128
 
                 text = "Game Over",
129
 
                 visible = false
130
 
              }
131
 
              the.interface:add(the.over)
132
 
 
133
 
 
134
 
              the.instructions = Text:new{
135
 
                 y = the.app.height / 2 + 32,
136
 
                 width = the.app.width,
137
 
                 align = 'center',
138
 
                 font = 12,
139
 
                 text = "Press Enter to start a new game\nPress Q to quit",
140
 
                 visible = false
141
 
              }
142
 
              the.interface:add(the.instructions)
143
 
 
144
127
              love.mouse.setGrab(true)
145
128
              love.mouse.setVisible(false)
146
129
              love.mouse.setPosition(the.app.width / 2, the.app.height / 2)