/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:59:03 UTC
  • Revision ID: josh@9ix.org-20131215195903-3pb7rnz9xow0wkc9
move quit keybindings to app

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
                                })
44
44
              end
45
45
 
46
 
              if self.level == 3 then
47
 
                 self:add(Text:new{
48
 
                             text = "R = Restart level",
49
 
                             x = 20, y = 20,
50
 
                             width = 200
51
 
                          })
52
 
              end
53
 
 
54
46
              if self.level ~= 1 then
55
47
                 self:flash({0,0,0})
56
48
              end
87
79
 
88
80
                    the.player.moved = false
89
81
                 end
90
 
 
91
 
                 if the.keys:justPressed('r') then
92
 
                    the.app.view = GameView:new{level = self.level}
93
 
                 end
94
82
              end,
95
83
}
96
84
 
97
85
SlowView = View:extend {
98
86
   onNew = function(self)
99
 
              local texts = {
100
 
                 '',
101
 
                 "Your movements have slowed...",
102
 
                 "Your movements have slowed...\nand they no longer only imitate you..."
103
 
              }
104
 
 
105
87
              local text = Text:new {
106
 
                 text = texts[self.level],
 
88
                 text = 'Your movements have slowed...',
107
89
                 --height = the.app.height,
108
90
                 width = the.app.width,
109
91
                 align = 'center',
145
127
}
146
128
 
147
129
the.app = App:new {
148
 
   name = "One Among Many",
 
130
   name = "LD28",
149
131
   fps = 30,
150
132
   onRun = function (self)
151
133
              print('Version: ' .. VERSION)