📜  glua 如何调用钩子 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:02.435000             🧑  作者: Mango

代码示例1
local function DoSomething()
    -- Does something
    hook.Call( "DoneDoingSomething" )
end

local function DoSomethingElse()
    -- Does something else, once the hook "DoneDoingSomething" is called.
    print( "Done!" )
end
hook.Add( "DoneDoingSomething", "Does something else", DoSomethingElse )

DoSomething()