aboutsummaryrefslogtreecommitdiff
path: root/scenes/level1_scene.lua
blob: f53270367f91f0e746f0808017cda176c174b377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
level1 = {} -- Level1 State
require("utils.screen_shaker")
Map = require("utils.map")
-- imports
require("utils.constants")

function level1:init()
  constants.resetColors()
  screenShake = ScreenShaker()
  map = Map("level1")
end

function level1:enter(previous)
end

function level1:update(dt)
  map:update(dt)
  screenShake:update(dt)
end

function level1:draw()
  screenShake:draw()
  map:draw()
end

function level1:keypressed(key, scancode)
  map:keypressed(key, scancode)
end

function level1:leave()
  map = nil
end


function printMessage()
  print('Hello')
end

return level1