cgdev.meٷLUAܹʹüҪ˵

1ڴ˼ܹУʹ˻ģ飨ModuleĻƣÿܶ /Module/*.luaУʹʱ뽫дõģ
 Module ļڣȻ Config.lua  useModule("*"); ɡ

2 Config.lua ļ벻Ҫ޸ĳ Module ļļҪԶչʱ /System/OtherModule
ļС

3 Delegate ࣬¼ίУʵַʽ /System/BaseModule/Delegate.lua в鿴

   ίڴһڰ󶨵¼Ƕļа󶨡
   ӣҴ A.lua  B.lua ģ顣
    A.lua 
   Delegate.RegDelLoginEvent("ALoginEvent");  --¼ί¼
   
   function ALoginEvent(player)
      NLG.SystemMessage(player,"Aʺ");
   end

    B.lua 
   Delegate.RegDelLoginEvent("BLoginEvent");  --¼ί¼
   
   function BLoginEvent(player)
      NLG.SystemMessage(player,"Bʺ");
   end

    Config.lua 
   useModule("A");
   useModule("B");
   
   ôҵ¼ʱ򣬻ͬʱյ
   A.luaʺ
   B.luaʺ
   ί¼õȺ˳ȡ Config.lua е˳

4ӣ뿴 /Module µ򵥵ӣ(laba.lua)ԭص¼(myLogin.lua)


ίз:

*RegInit  /*  NPCƷʼʱʹ */
*RegDelTalkEvent 
*RegDelBattleStartEvent
*RegDelBattleOverEvent
*RegDelLoginEvent
*RegDelLogoutEvent
*RegDelDropEvent
*RegDelLoginGateEvent
*RegDelWarpEvent
*RegDelAllOutEvent /* 뿪¼ߡעί֮ǰҲDropEventLogoutEvent */


