Example #1
0
 void OnDestroy()
 {
     if (iCalc != null)
     {
         iCalc.OnDestroy();
     }
     iCalc = null;
 }
Example #2
0
    void Awake()
    {
        LuaEnv luaEnv = LuaHotfix.Instance.luaEnv;

        luaEnv.DoString("require '" + luaModel + "'", luaModel);

        LuaBehaviourCalc calc_new = luaEnv.Global.GetInPath <LuaBehaviourCalc> ("new_lua_mono");

        iCalc = calc_new(luaModel, this);        //constructor

        iCalc.Awake();
    }