8
GameView = View:extend {
9
onNew = function (self)
10
t = Text:new{y = 300, width = the.app.width, align = 'center',
11
text = 'This space intentionally left blank'}
14
--self:loadLayers('data/map.lua')
15
--self.focus = the.player
16
--self:clampTo(self.map)
18
draw = function (self, x, y)
20
love.graphics.print('FPS:' .. love.timer.getFPS(), 20, 20)
24
MenuScreen = View:extend {
25
title = Text:new{text = "Press a key to start", font = 48, wordWrap = false},
26
--title = Tile:new{image = 'data/title.png', x = 0, y = 0},
27
onNew = function(self)
29
self.title:centerAround(400, 200)
31
onUpdate = function(self, elapsed)
32
if the.keys:allJustPressed() then
33
the.app.view = GameView:new()
39
onRun = function (self)
40
print('Version: ' .. VERSION)
41
self.view = GameView:new()
43
self.console:watch('VERSION', 'VERSION')
44
self.console:watch('updateTook', 'the.updateTook')
45
--self.console:watch('drawTook', 'the.drawTook')
48
onUpdate = function (self, dt)
49
if the.keys:justPressed('escape') then
53
update = function (self, dt)
54
the.updateStart = love.timer.getMicroTime()
56
if the.updateStart then
57
the.updateTook = love.timer.getMicroTime() - the.updateStart