/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 19:47:43 UTC
  • Revision ID: josh@9ix.org-20131215194743-ye0rbul4qruqau4g
title screen

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
           end
118
118
}
119
119
 
 
120
TitleView = View:extend {
 
121
   onNew = function(self)
 
122
              self:add(Tile:new{
 
123
                          image = 'data/title.png'
 
124
                       })
 
125
           end,
 
126
   onUpdate = function(self)
 
127
                 if the.keys:allJustPressed() then
 
128
                    the.app.view = GameView:new{level = 1}
 
129
                 end
 
130
              end
 
131
}
 
132
 
120
133
the.app = App:new {
121
134
   name = "LD28",
122
135
   fps = 30,
123
136
   onRun = function (self)
124
137
              print('Version: ' .. VERSION)
125
138
 
126
 
              self.view = GameView:new{level = 1}
127
 
              --self.view = SlowView:new{level = 1}
 
139
              --self.view = GameView:new{level = 1}
 
140
              self.view = TitleView:new()
128
141
 
129
142
              if DEBUG then
130
143
                 self.console:watch('VERSION', 'VERSION')