Example #1
0
    public void Destroy()
    {
        if (luaState != null)
        {
            if (UpdateEvent != null)
            {
                UpdateEvent.Dispose();
                UpdateEvent = null;
            }

            if (LateUpdateEvent != null)
            {
                LateUpdateEvent.Dispose();
                LateUpdateEvent = null;
            }

            if (FixedUpdateEvent != null)
            {
                FixedUpdateEvent.Dispose();
                FixedUpdateEvent = null;
            }

            luaState = null;
        }
    }
        public void Close()
        {
            SafeRelease(ref updateFunc);
            SafeRelease(ref lateUpdateFunc);
            SafeRelease(ref fixedUpdateFunc);

            if (UpdateEvent != null)
            {
                UpdateEvent.Dispose();
                UpdateEvent = null;
            }

            if (LateUpdateEvent != null)
            {
                LateUpdateEvent.Dispose();
                LateUpdateEvent = null;
            }

            if (FixedUpdateEvent != null)
            {
                FixedUpdateEvent.Dispose();
                FixedUpdateEvent = null;
            }
            lua.Dispose();
            lua    = null;
            loader = null;
        }
Example #3
0
 private void LateUpdate()
 {
     if (Instance == this)
     {
         LateUpdateEvent?.Invoke();
     }
 }
Example #4
0
    public void Destroy()
    {
        if (luaState != null)
        {
            SafeRelease(ref updateFunc);
            SafeRelease(ref lateUpdateFunc);
            SafeRelease(ref fixedUpdateFunc);

            if (UpdateEvent != null)
            {
                UpdateEvent.Dispose();
                UpdateEvent = null;
            }

            if (LateUpdateEvent != null)
            {
                LateUpdateEvent.Dispose();
                LateUpdateEvent = null;
            }

            if (FixedUpdateEvent != null)
            {
                FixedUpdateEvent.Dispose();
                FixedUpdateEvent = null;
            }

            luaState = null;
        }
    }
Example #5
0
    void OnApplicationQuit()
    {
        if (luaState != null)
        {
            SafeRelease(ref updateFunc);
            SafeRelease(ref lateUpdateFunc);
            SafeRelease(ref fixedUpdateFunc);
            SafeRelease(ref levelLoaded);

            if (UpdateEvent != null)
            {
                UpdateEvent.Dispose();
                UpdateEvent = null;
            }

            if (LateUpdateEvent != null)
            {
                LateUpdateEvent.Dispose();
                LateUpdateEvent = null;
            }

            if (FixedUpdateEvent != null)
            {
                FixedUpdateEvent.Dispose();
                FixedUpdateEvent = null;
            }

            luaState.Dispose();
            luaState = null;
            Instance = null;
        }
    }
Example #6
0
    public void Close()
    {
        SafeRelease(ref updateFunc);
        SafeRelease(ref lateUpdateFunc);
        SafeRelease(ref fixedUpdateFunc);

        if (UpdateEvent != null)
        {
            UpdateEvent.Dispose();
            UpdateEvent = null;
        }

        if (LateUpdateEvent != null)
        {
            LateUpdateEvent.Dispose();
            LateUpdateEvent = null;
        }

        if (FixedUpdateEvent != null)
        {
            FixedUpdateEvent.Dispose();
            FixedUpdateEvent = null;
        }
        _luaState.Dispose();
        _luaState = null;
    }
 public void OnLateUpdate(LateUpdateEvent ev)
 {
     if (!first)
     {
         first = true;
         Info("[First] 正在更新数据.");
         new Thread(new ThreadStart(() => new ListUpdateThread())).Start();
     }
 }
Example #8
0
 // ReSharper disable once UnusedMember.Local
 private void LateUpdate()
 {
     LateUpdateEvent?.Invoke();
 }
Example #9
0
 public void OnLateUpdate(LateUpdateEvent ev)
 {
     send(ev, new IdMapping());
 }
Example #10
0
 private void LateUpdate()
 {
     _loopSystemsLateUpdate?.Invoke();
     LateUpdateEvent?.Invoke();
 }
Example #11
0
 /// <summary>
 /// 删除LateUpdate监听
 /// </summary>
 public void RemoveLateUpdateListener(LateUpdateEvent listener)
 {
     mLateUpdateEvent -= listener;
 }
Example #12
0
 /// <summary>
 /// 添加LateUpdate监听
 /// </summary>
 public void AddLateUpdateListener(LateUpdateEvent listener)
 {
     mLateUpdateEvent += listener;
 }