/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-11 01:33:32 UTC
  • Revision ID: josh@9ix.org-20130411013332-7bf1zydct2v4rbyk
zoetrope 1.4 (and revert my sprite changes)

Show diffs side-by-side

added added

removed removed

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