aboutsummaryrefslogtreecommitdiff
path: root/scenes/level1_scene.lua
diff options
context:
space:
mode:
authorIndrajith K L2022-02-28 03:52:24 +0530
committerIndrajith K L2022-02-28 03:52:24 +0530
commit77f087952dda8cd3608f578877dab3c667fedabc (patch)
treecbe8505217275ff3b06c62602e6b61e38dbb036b /scenes/level1_scene.lua
parent48a80e29d52ded091d1f9425315957892f0070f7 (diff)
downloadYEAD-77f087952dda8cd3608f578877dab3c667fedabc.tar.gz
YEAD-77f087952dda8cd3608f578877dab3c667fedabc.tar.bz2
YEAD-77f087952dda8cd3608f578877dab3c667fedabc.zip
Adds Screen Shake on every 10 seconds
Diffstat (limited to 'scenes/level1_scene.lua')
-rw-r--r--scenes/level1_scene.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/scenes/level1_scene.lua b/scenes/level1_scene.lua
index 30406df..f532703 100644
--- a/scenes/level1_scene.lua
+++ b/scenes/level1_scene.lua
@@ -1,11 +1,12 @@
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
@@ -14,9 +15,11 @@ end
function level1:update(dt)
map:update(dt)
+ screenShake:update(dt)
end
function level1:draw()
+ screenShake:draw()
map:draw()
end
@@ -28,4 +31,9 @@ function level1:leave()
map = nil
end
+
+function printMessage()
+ print('Hello')
+end
+
return level1 \ No newline at end of file