/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 02:38:46 UTC
  • Revision ID: josh@9ix.org-20130825023846-wgea9oh4n0o16gct
separate collision box for player so it can scale

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