/ld27

To get this branch, use:
bzr branch http://9ix.org/bzr/ld27

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-08-26 00:10:14 UTC
  • Revision ID: josh@9ix.org-20130826001014-d7iobtdaet72558t
actually handle multiple goals in one maze

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
STRICT = true
2
 
DEBUG = false
 
2
DEBUG = true
3
3
 
4
4
require 'zoetrope'
5
5
--require 'pepperprof'
60
60
              --the.profiler = newProfiler()
61
61
              --the.profiler:start()
62
62
 
63
 
              self.gameStart = love.timer.getTime()
64
 
              self.lastChange = love.timer.getTime()
 
63
              self.gameStart = love.timer.getMicroTime()
 
64
              self.lastChange = love.timer.getMicroTime()
65
65
           end,
66
66
   onUpdate = function(self, dt)
67
 
                 if the.player.active and love.timer.getTime() > self.lastChange + 10 then
 
67
                 if the.player.active and love.timer.getMicroTime() > self.lastChange + 10 then
68
68
                    -- switch maze
69
69
                    self:switchMaze()
70
70
                 end
117
117
                   self._fx = {0,0,0,0}
118
118
                   self.tween:start(self._fx, 4, 175, 10, 'quadIn')
119
119
 
120
 
                   self.lastChange = love.timer.getTime()
 
120
                   self.lastChange = love.timer.getMicroTime()
121
121
                end,
122
122
   onEndFrame = function(self)
123
123
                   --the.interface.translate.x = the.player.x - the.app.width / 2 + the.player.width / 2
133
133
 
134
134
              local nr = 'data/NewRocker-Regular.otf'
135
135
              self:add(Text:new{
136
 
                          text = 'Treasures of the Decimaze',
 
136
                          text = 'Name Of Game',
137
137
                          --x = 0,
138
138
                          y = 100,
139
139
                          width = self.bg.width,
179
179
}
180
180
 
181
181
the.app = App:new {
182
 
   name = "Treasures of the Decimaze",
183
182
   onRun = function (self)
184
183
              print('Version: ' .. VERSION)
185
184
 
195
194
              end
196
195
           end,
197
196
   onUpdate = function (self, dt)
198
 
                 if the.keys:justPressed('f1') then
199
 
                    local ss = love.graphics.newScreenshot()
200
 
                    ss:encode('screenshot-' ..love.timer.getTime()..'.png')
201
 
                 end
202
197
              end
203
198
}