Esempio n. 1
0
 public LuaEnvManager()
 {
     if (manager != null)
     {
         LogUtil.Error(LuaUtility.LOGGER_NAME, "");
         return;
     }
     manager = this;
     DoInit();
 }
Esempio n. 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;
        }
Esempio n. 3
0
 private void Start()
 {
     LuaEnvManager.GetInstance().DoStart();
 }
Esempio n. 4
0
 private void LateUpdate()
 {
     LuaEnvManager.GetInstance().DoLateUpdate();
 }