Пример #1
0
        public void Dispose()
        {
            if (scriptIsReady)
            {
                if (true || !is_OnDisable)
                {
                    is_OnDisable = true;
                    LuaController.RemoveEventListener(luaObject);
                }
            }
            started       = false;
            scriptIsReady = false;

            if (l_OnDestroy != null && L != null)
            {
                l_OnDestroy(luaObject);
            }

            l_Start              = null;
            l_OnDestroy          = null;
            l_Update             = null;
            l_onEvent            = null;
            l_OnDisable          = null;
            l_OnEnable           = null;
            l_OnApplicationPause = null;

            if (L != null && luaObject != null)
            {
                luaObject.Dispose();
            }
            luaObject = null;
        }
Пример #2
0
 void OnDisable()
 {
     if (luaObject != null && L != null)
     {
         LuaController.RemoveEventListener(luaObject);
     }
 }
Пример #3
0
 void OnDisable()
 {
     if (scriptIsReady && luaObject != null && L != null && !is_OnDisable)
     {
         if (l_OnDisable != null)
         {
             l_OnDisable(luaObject);
         }
         is_OnDisable = true;
         LuaController.RemoveEventListener(luaObject);
     }
 }