feature/audioengine #26

Manually merged
PeaAshMeter merged 11 commits from feature/audioengine into main 2026-01-18 17:56:13 +03:00
4 changed files with 5 additions and 0 deletions
Showing only changes of commit 28b0384285 - Show all commits

Binary file not shown.

0
lib/audio.lua Normal file
View File

View File

@ -144,6 +144,7 @@ function attack:cast(caster, target)
AnimationNode {
function(node)
targetSprite:animate("hurt", node)
Tree.assets.files.audio.sounds.hurt:play()
end
}
}

View File

@ -50,6 +50,10 @@ function AssetBundle.loadFile(path)
return love.graphics.newShader(path);
elseif (ext == "lua") then
return require(string.gsub(path, ".lua", ""))
elseif (ext == "mp3") and string.find(path, "sounds") then
return love.audio.newSource(path, 'static')
elseif (ext == "mp3") and string.find(path, "music") then
return love.audio.newSource(path, 'stream')
end
return nil
end