/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:24:12 UTC
  • Revision ID: josh@9ix.org-20130825152412-t0uzxw6fd92i81rj
pause/quit screen

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
--require 'wrap_tile'
11
11
require 'player'
12
12
require 'goal'
 
13
require 'pause_view'
13
14
 
14
15
GameView = View:extend {
15
16
   gameStart = 0,
62
63
                    the.player.collider:collide(the.activeGoal)
63
64
                 end
64
65
 
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
 
66
                 if the.keys:justPressed('escape', 'q') then
 
67
                    PauseView:new():activate()
 
68
                 end
71
69
              end,
72
70
   switchMaze = function(self)
73
71
                   if the.activeMaze then
139
137
              end
140
138
           end,
141
139
   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
140
              end
153
141
}