Пример #1
0
 public LuaEnvManager()
 {
     if (manager != null)
     {
         LogUtil.Error(LuaUtility.LOGGER_NAME, "");
         return;
     }
     manager = this;
     DoInit();
 }
Пример #2
0
        public void Shuntdown()
        {
            if (envBehaviour != null)
            {
                UnityObject.Destroy(envBehaviour.gameObject);
                envBehaviour = null;
            }

            if (IsValid)
            {
                if (localLanguage != null)
                {
                    localLanguage.Dispose();
                }

                LuaFunction destroyFunc = GameTable.Get <LuaFunction>(LuaUtility.DESTROY_FUNCTION_NAME);
                destroyFunc.Action();
                destroyFunc.Dispose();

                instanceWithFunc.Dispose();
                OOPTable.Dispose();
                GameTable.Dispose();
            }

            localLanguage = null;

            updateAction     = null;
            lateUpdateAction = null;
            usingFunc        = null;
            instanceFunc     = null;
            instanceWithFunc = null;
            GameTable        = null;
            OOPTable         = null;

            if (IsValid)
            {
                Env.FullGc();
                Env.Dispose();
            }
            Env     = null;
            manager = null;
        }
Пример #3
0
 private void Start()
 {
     LuaEnvManager.GetInstance().DoStart();
 }
Пример #4
0
 private void LateUpdate()
 {
     LuaEnvManager.GetInstance().DoLateUpdate();
 }