From 05add67d6f95c51a3501bc15a742cf9fccc4b67e Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Mon, 28 Feb 2022 04:08:01 +0530 Subject: Adds SFX for monster growl --- assets/maps/level1.lua | 41 +++++++++++++++++++++++++++++++++- assets/sfx/sfx_deathscream_alien1.wav | Bin 0 -> 133922 bytes utils/screen_shaker.lua | 2 ++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 assets/sfx/sfx_deathscream_alien1.wav diff --git a/assets/maps/level1.lua b/assets/maps/level1.lua index 59bb243..41084c5 100644 --- a/assets/maps/level1.lua +++ b/assets/maps/level1.lua @@ -9,7 +9,7 @@ return { tilewidth = 16, tileheight = 16, nextlayerid = 6, - nextobjectid = 21, + nextobjectid = 25, properties = {}, tilesets = { { @@ -273,6 +273,45 @@ return { rotation = 0, visible = true, properties = {} + }, + { + id = 22, + name = "", + type = "", + shape = "rectangle", + x = 256, + y = 48, + width = 6.9375, + height = 16, + rotation = 0, + visible = true, + properties = {} + }, + { + id = 23, + name = "", + type = "", + shape = "rectangle", + x = 280.969, + y = 48, + width = 6.9375, + height = 16, + rotation = 0, + visible = true, + properties = {} + }, + { + id = 24, + name = "", + type = "", + shape = "rectangle", + x = 263.375, + y = 54.875, + width = 17.25, + height = 9.0625, + rotation = 0, + visible = true, + properties = {} } } }, diff --git a/assets/sfx/sfx_deathscream_alien1.wav b/assets/sfx/sfx_deathscream_alien1.wav new file mode 100644 index 0000000..7786710 Binary files /dev/null and b/assets/sfx/sfx_deathscream_alien1.wav differ diff --git a/utils/screen_shaker.lua b/utils/screen_shaker.lua index ca996af..aef89e4 100644 --- a/utils/screen_shaker.lua +++ b/utils/screen_shaker.lua @@ -4,6 +4,7 @@ local Timer = require("libs.hump.Timer") ScreenShaker = Class { init = function(self) + monsterGrowl = love.audio.newSource("assets/sfx/sfx_deathscream_alien1.wav", "static") local width, height = love.graphics.getDimensions() Shack:setDimensions(width, height) Timer.every(10, shakeScreen) @@ -21,6 +22,7 @@ end function shakeScreen() Shack:setShake(20) + monsterGrowl:play() end return ScreenShaker \ No newline at end of file -- cgit v1.2.3