/ld28

To get this branch, use:
bzr branch http://9ix.org/bzr/ld28

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-12-15 18:36:53 UTC
  • Revision ID: josh@9ix.org-20131215183653-47wmq1ux17xspk93
intermidiate + win screens

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
 
80
80
                    the.player.moved = false
81
81
                 end
 
82
 
 
83
                 if the.keys:justPressed('escape', 'q') then
 
84
                    the.app:quit()
 
85
                 end
82
86
              end,
83
87
}
84
88
 
113
117
           end
114
118
}
115
119
 
116
 
TitleView = View:extend {
117
 
   onNew = function(self)
118
 
              self:add(Tile:new{
119
 
                          image = 'data/title.png'
120
 
                       })
121
 
           end,
122
 
   onUpdate = function(self)
123
 
                 if the.keys:allJustPressed() then
124
 
                    the.app.view = GameView:new{level = 1}
125
 
                 end
126
 
              end
127
 
}
128
 
 
129
120
the.app = App:new {
130
121
   name = "LD28",
131
122
   fps = 30,
132
123
   onRun = function (self)
133
124
              print('Version: ' .. VERSION)
134
125
 
135
 
              --self.view = GameView:new{level = 1}
136
 
              self.view = TitleView:new()
 
126
              self.view = GameView:new{level = 1}
 
127
              --self.view = SlowView:new{level = 1}
137
128
 
138
129
              if DEBUG then
139
130
                 self.console:watch('VERSION', 'VERSION')
148
139
                    local ss = love.graphics.newScreenshot()
149
140
                    ss:encode('screenshot-' ..love.timer.getTime()..'.png')
150
141
                 end
151
 
 
152
 
                 if the.keys:justPressed('escape', 'q') then
153
 
                    the.app:quit()
154
 
                 end
155
142
              end
156
143
}