/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:55:40 UTC
  • Revision ID: josh@9ix.org-20130625195540-f4nwz7ffj9f6658a
patch zoetrope storage so it can save lists (arrays indexed by number)

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
23
 
25
24
util = {
26
25
   signOf = function(value)
95
94
 
96
95
                 -- load player with cargo, money, position
97
96
                 the.player = SpacePlayer:new(the.storage.data.player)
98
 
 
99
 
                 -- reload storage as we've turned it all into objects
100
 
                 the.storage:load()
101
97
              end
102
98
 
103
99
              self:add(the.planets)
124
120
              the.cursor = Cursor:new()
125
121
              self:add(the.cursor)
126
122
 
 
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
 
127
144
              love.mouse.setGrab(true)
128
145
              love.mouse.setVisible(false)
129
146
              love.mouse.setPosition(the.app.width / 2, the.app.height / 2)