/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-16 00:27:10 UTC
  • Revision ID: josh@9ix.org-20130416002710-4soqj70ln7hdrzdb
testing audio

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'
15
14
 
16
15
util = {
17
16
   dim = function(dir)
56
55
   --        end
57
56
}
58
57
 
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
 
 
73
58
the.app = App:new {
74
59
   record = true,
75
60
   onRun = function (self)
76
 
              self.view = MenuScreen:new()
 
61
              self.view = GameView:new()
77
62
              if DEBUG then
78
 
                 self.console:watch('VERSION', 'VERSION')
79
63
                 self.console:watch('onGround', 'the.player.onGround')
80
64
                 self.console:watch('onWall', 'the.player.onWall')
81
65
                 self.console:watch('updateTook', 'the.updateTook')
96
80
                       outfile:close()
97
81
                    end
98
82
 
99
 
                    if self.record and the.recorder then
 
83
                    if self.record then
100
84
                       if not love.filesystem.remove('record.lua') then
101
85
                          print('could not remove record.lua')
102
86
                       end