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)
27
love.graphics.print('version:' .. VERSION, 20, 570)
32
onRun = function (self)
33
self.view = GameView:new()
35
self.console:watch('VERSION', 'VERSION')
36
self.console:watch('updateTook', 'the.updateTook')
37
--self.console:watch('drawTook', 'the.drawTook')
40
onUpdate = function (self, dt)
41
if the.keys:justPressed('escape') then
45
update = function (self, dt)
46
the.updateStart = love.timer.getMicroTime()
48
if the.updateStart then
49
the.updateTook = love.timer.getMicroTime() - the.updateStart