From 2fdf16620ba5b3e888f70cee2bc1f6832814913d Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Mon, 21 Mar 2022 21:41:57 +0530 Subject: Player, Enemy Animations Collision Changes --- scenes/level1_scene.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'scenes/level1_scene.lua') diff --git a/scenes/level1_scene.lua b/scenes/level1_scene.lua index 58fb639..0519ca3 100644 --- a/scenes/level1_scene.lua +++ b/scenes/level1_scene.lua @@ -1,10 +1,12 @@ level1 = {} -- Level1 State require("core.screen_shaker") Map = require("core.map") +--require("scenes.menu_scene") +local Gamestate = require("libs.hump.gamestate") -- imports require("core.constants") require("core.ambience") - +local map function level1:init() constants.resetColors() screenShake = ScreenShaker() @@ -13,6 +15,7 @@ function level1:init() end function level1:enter(previous) + end function level1:update(dt) @@ -27,10 +30,13 @@ end function level1:keypressed(key, scancode) map:keypressed(key, scancode) + if scancode=="r" then + love.audio.stop( ) + Gamestate.switch(menu) + end end function level1:leave() - map = nil end -return level1 \ No newline at end of file +return level1 -- cgit v1.2.3