Compare commits
1 Commits
main
...
feature/au
| Author | SHA1 | Date | |
|---|---|---|---|
| 28b0384285 |
BIN
assets/audio/sounds/hurt.mp3
Normal file
BIN
assets/audio/sounds/hurt.mp3
Normal file
Binary file not shown.
0
lib/audio.lua
Normal file
0
lib/audio.lua
Normal 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
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user