/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-25 15:35:26 UTC
  • Revision ID: josh@9ix.org-20130825153526-dcl4okzlmbyhmziz
cruft

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
require 'zoetrope'
5
5
--require 'pepperprof'
6
6
 
7
 
--require 'group'
8
 
 
9
7
require 'version'
10
 
--require 'wrap_tile'
11
8
require 'player'
12
9
require 'goal'
 
10
require 'pause_view'
13
11
 
14
12
GameView = View:extend {
15
13
   gameStart = 0,
62
60
                    the.player.collider:collide(the.activeGoal)
63
61
                 end
64
62
 
65
 
                 -- for _, mirror in ipairs(the.mirrors.sprites) do
66
 
                 --    if not mirror.of then
67
 
                 --       print('mirror:' .. inspect(mirror))
68
 
                 --       error('mirror OF NOTHING')
69
 
                 --    end
70
 
                 -- end
 
63
                 if the.keys:justPressed('escape', 'q') then
 
64
                    PauseView:new():activate()
 
65
                 end
71
66
              end,
72
67
   switchMaze = function(self)
73
68
                   if the.activeMaze then
139
134
              end
140
135
           end,
141
136
   onUpdate = function (self, dt)
142
 
                 if the.keys:justPressed('escape') then
143
 
                    if the.profiler then
144
 
                       the.profiler:stop()
145
 
                       local outfile = io.open( "profile.txt", "w+" )
146
 
                       the.profiler:report( outfile )
147
 
                       outfile:close()
148
 
                    end
149
 
 
150
 
                    self.quit()
151
 
                 end
152
137
              end
153
138
}