11
GameView = View:extend {
12
onNew = function (self)
13
bg = Tile:new{image = 'data/forest1-bg.png'}
14
fg = Tile:new{image = 'data/forest1-fg.png'}
15
the.player = Player:new{x = 196, y = 350}
20
--self:loadLayers('data/map.lua')
21
--self.focus = the.player
22
--self:clampTo(self.map)
24
draw = function (self, x, y)
26
love.graphics.print('FPS:' .. love.timer.getFPS(), 20, 20)
31
onRun = function (self)
32
self.view = GameView:new()
34
self.console:watch('VERSION', 'VERSION')
35
self.console:watch('updateTook', 'the.updateTook')
36
--self.console:watch('drawTook', 'the.drawTook')
39
onUpdate = function (self, dt)
40
if the.keys:justPressed('escape') then
44
update = function (self, dt)
45
the.updateStart = love.timer.getMicroTime()
47
if the.updateStart then
48
the.updateTook = love.timer.getMicroTime() - the.updateStart