예제 #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();
 }