From 77f087952dda8cd3608f578877dab3c667fedabc Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Mon, 28 Feb 2022 03:52:24 +0530 Subject: Adds Screen Shake on every 10 seconds --- scenes/level1_scene.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'scenes/level1_scene.lua') 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 -- cgit v1.2.3