Ejemplo n.º 1
0
        private void Reset()
        {
            try
            {
                _Colliders.Clear();
                UnrefLuaObject();
                ClearAllBehavior();

                if (_TimerList != null)
                {
                    _TimerList.Clear();
                    _TimerList = null;
                }
                _SubobjectCollideTrans = null;

                if (ObjType == OBJ_TYPE.HOSTPLAYER)
                {
                    Main.HostPlayerRadius = 0.1f;
                }

                OffsetY           = 0;
                UsingGroundNormal = false;

                PhysicsHandler = null;
                _32BitID       = 0;
                _Radius        = 0;
                ObjType        = OBJ_TYPE.NONE;
            }
            catch (Exception e)
            {
                Debug.LogException(e);
            }
        }
Ejemplo n.º 2
0
    void OnApplicationQuit()
    {
        _IsQuiting = true;

        //CTimerList.ShowDiagnostics();
        //EntityVisualEffect.EffectObjectPool.ShowDiagnostics();
        //MaterialPool.Instance.ShowDiagnostics();
        //FileImage.ShowDiagnostics();
        if (_IsCurlInited)
        {
            Curl.GlobalCleanup();
            _IsCurlInited = false;
        }

        CGameSession.Instance().Close();

        if (_IsInited)
        {
            LuaScriptMgr.Instance.CallLuaFunction("ReleaseGame");
            LuaScriptMgr.Instance.Destroy();
            NavMeshManager.Instance.Release();
            LuaDLL.HOBA_Release();
            _IsInited = false;
        }

        _TimerList.Clear();
        _LateTimerList.Clear();

        CLogicObjectMan <ObjectBehaviour> .Instance.Cleanup();

        CLogicObjectMan <EntityEffectComponent> .Instance.Cleanup();

        ResCacheMan.Instance.Cleanup();
        CFxCacheMan.Instance.Cleanup();

        HobaDebuger.Log("Application Quit!");
    }