/zoeplat

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-04-22 20:42:06 UTC
  • Revision ID: josh@9ix.org-20130422204206-of4wo7sulpkp0pft
stop build from dropping backup files EVERYWHERE

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
require 'animation'
12
12
require 'player'
13
13
require 'balloon'
 
14
require 'version'
14
15
 
15
16
util = {
16
17
   dim = function(dir)
55
56
   --        end
56
57
}
57
58
 
 
59
MenuScreen = View:extend {
 
60
   --title = Text:new{text = "Test Platform Game", font = 48, wordWrap = false},
 
61
   title = Tile:new{image = 'data/title.png', x = 0, y = 0},
 
62
   onNew = function(self)
 
63
              self:add(self.title)
 
64
              --self.title:centerAround(400, 200)
 
65
           end,
 
66
   onUpdate = function(self, elapsed)
 
67
                 if the.keys:allJustPressed() then
 
68
                    the.app.view = GameView:new()
 
69
                 end
 
70
              end
 
71
}
 
72
 
58
73
the.app = App:new {
59
74
   record = true,
60
75
   onRun = function (self)
61
 
              self.view = GameView:new()
 
76
              self.view = MenuScreen:new()
62
77
              if DEBUG then
 
78
                 self.console:watch('VERSION', 'VERSION')
63
79
                 self.console:watch('onGround', 'the.player.onGround')
64
80
                 self.console:watch('onWall', 'the.player.onWall')
65
81
                 self.console:watch('updateTook', 'the.updateTook')
80
96
                       outfile:close()
81
97
                    end
82
98
 
83
 
                    if self.record then
 
99
                    if self.record and the.recorder then
84
100
                       if not love.filesystem.remove('record.lua') then
85
101
                          print('could not remove record.lua')
86
102
                       end