/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 00:16:36 UTC
  • Revision ID: josh@9ix.org-20130825001636-xoivc9byo1mdx0fu
1 goal in each maze

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
DEBUG = true
3
3
 
4
4
require 'zoetrope'
5
 
--require 'pepperprof'
6
5
 
7
6
--require 'group'
8
7
 
44
43
 
45
44
              self:switchMaze()
46
45
 
47
 
              -- profiling...
48
 
              --the.profiler = newProfiler()
49
 
              --the.profiler:start()
50
 
 
51
46
              self.gameStart = love.timer.getMicroTime()
52
47
              self.lastChange = love.timer.getMicroTime()
53
48
           end,
59
54
 
60
55
                 if not (DEBUG and the.console.visible) then
61
56
                    the.activeMaze:collide(the.player)
62
 
                    the.player:collide(the.activeGoal)
63
57
                 end
64
58
 
65
59
                 -- for _, mirror in ipairs(the.mirrors.sprites) do
81
75
                      the.activeBg.visible = false
82
76
                      the.activeBg = self.bgs[newMaze]
83
77
 
84
 
                      if the.activeGoal then
85
 
                         the.activeGoal.visible = false
86
 
                      end
 
78
                      the.activeGoal.visible = false
87
79
                      the.activeGoal = self.goals[newMaze]
88
80
                   else
89
81
                      the.activeMaze = self.maze2
93
85
 
94
86
                   the.activeMaze:revive()
95
87
                   the.activeBg.visible = true
96
 
                   if the.activeGoal then
97
 
                      the.activeGoal.visible = true
98
 
                   end
 
88
                   the.activeGoal.visible = true
99
89
                   the.player.scale = the.activeMaze.playerScale
100
90
 
101
91
                   self._fx = {0,0,0,0}
138
128
           end,
139
129
   onUpdate = function (self, dt)
140
130
                 if the.keys:justPressed('escape') then
141
 
                    if the.profiler then
142
 
                       the.profiler:stop()
143
 
                       local outfile = io.open( "profile.txt", "w+" )
144
 
                       the.profiler:report( outfile )
145
 
                       outfile:close()
146
 
                    end
147
 
 
148
131
                    self.quit()
149
132
                 end
150
133
              end