/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:
3
3
 
4
4
require 'zoetrope'
5
5
--require 'pepperprof'
6
 
--inspect = require 'inspect'
7
 
 
8
 
require 'sprite'
9
 
require 'util'
10
6
 
11
7
require 'version'
12
8
require 'player'
13
9
require 'goal'
14
10
require 'pause_view'
15
 
require 'win_view'
16
11
 
17
12
GameView = View:extend {
18
13
   gameStart = 0,
34
29
              self.maze3.playerScale = 1
35
30
 
36
31
              self.goals = {}
37
 
              the.goalsAchieved = 0
38
32
              for _, obj in ipairs(self.objects.sprites) do
39
33
                 if obj:instanceOf(Goal) then
40
34
                    obj.visible = false
62
56
                 end
63
57
 
64
58
                 if not (DEBUG and the.console.visible) then
65
 
                    --the.player.collider:collide(the.activeMaze)
 
59
                    the.activeMaze:collide(the.player.collider)
66
60
                    the.player.collider:collide(the.activeGoal)
67
61
                 end
68
62
 
69
63
                 if the.keys:justPressed('escape', 'q') then
70
64
                    PauseView:new():activate()
71
 
                 --elseif the.keys:justPressed('w') then
72
 
                 --   WinView:new():activate()
73
65
                 end
74
66
              end,
75
67
   switchMaze = function(self)
136
128
 
137
129
              if DEBUG then
138
130
                 self.console:watch('VERSION', 'VERSION')
139
 
                 self.console:watch('player.x', 'the.player.x')
140
 
                 self.console:watch('player.y', 'the.player.y')
141
131
 
142
132
                 -- back off that dark overlay a bit
143
133
                 self.console.fill.fill[4] = 75