c1_lua/lua/app/hotfix/item/hotfix_timelinemanager.lua
2023-04-03 10:59:13 +08:00

52 lines
1.2 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

--格式one csharp class, one lua table
--更多操作https://github.com/Tencent/xLua/blob/master/Assets/XLua/Doc/faq.md
--https://github.com/Tencent/xLua/blob/master/Assets/XLua/Doc/hotfix.md
local Hotfix_EffectHelper = {}
-------------------配置--------------------
-- 热更csharp类
local CSClass = CS.BF.EffectHelper
-- 配置对应类型的函数,cs/lua两端的函数名保持一致
-- 重载函数需在热更lua函数中做参数判断
-- 配置中'_ex'指可以在热更函数中再次调用csharp对应的函数
local FuncCfg =
{
-- public = {
-- },
public_ex = {
"Play",
},
-- private = {
-- },
-- private_ex = {
-- },
-- ienumerator = {
-- },
-- ienumerator_private = {
-- }
}
----------------------------------------------
------------------具体实现----------------------
function Hotfix_EffectHelper:Play(gameobject)
Logger.log("lua2csharp hotfix %s", gameobject.name)
self:Play(gameobject) --self指的是对应的c#实例
end
----------------------------------------------------
----------------------执行---------------------------
function Hotfix_EffectHelper:__execute()
HotfixCore.execute(self, CSClass, FuncCfg)
end
Hotfix_EffectHelper:__execute()
----------------------------------------------------