Skip to content

Commit

Permalink
修sfx和bgm模块未实际加载时的初始化方法名错误
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Dec 17, 2024
1 parent 8fd9a31 commit db515d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bgm.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
if not (love.audio and love.sound) then
LOG("BGM lib is not loaded (need love.audio & love.sound)")
return setmetatable({
init=function()
error("attempt to use BGM.init, but BGM lib is not loaded (need love.audio & love.sound)")
load=function()
error("attempt to use BGM.load, but BGM lib is not loaded (need love.audio & love.sound)")
end
},{
__index=function(t,k)
Expand Down
4 changes: 2 additions & 2 deletions sfx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ end

if not (love.filesystem and love.audio and love.sound) then
LOG("SFX lib is not loaded (need love.filesystem & love.audio & love.sound)")
function SFX.init()
error("attempt to use SFX.init, but SFX lib is not loaded (need love.filesystem & love.audio & love.sound)")
function SFX.load()
error("attempt to use SFX.load, but SFX lib is not loaded (need love.filesystem & love.audio & love.sound)")
end
return setmetatable(SFX,{
__index=function(t,k)
Expand Down

0 comments on commit db515d1

Please sign in to comment.