public void OnDestroy() { mLayoutPrefabManager.destroy(); mMahjongSystem.destroy(); mSocketManager.destroy(); mCharacterManager.destroy(); mGameSceneManager.destroy(); mAudioManager.destroy(); mLayoutManager.destroy(); mCommandSystem.destroy(); mGameConfig.destory(); mKeyFrameManager.destroy(); mHttpServerManager.destroy(); mGlobalTouchSystem.destroy(); mDllImportExtern.destroy(); mShaderManager.destroy(); mDataBase.destroy(); mCameraManager.destroy(); mResourcesManager.destroy(); mMaterialManager.destroy(); mApplicationConfig.destory(); mPlayerHeadManager.destroy(); mLayoutPrefabManager = null; mMahjongSystem = null; mGameConfig = null; mGameUtility = null; mBinaryUtility = null; mFileUtility = null; mMathUtility = null; mStringUtility = null; mUnityUtility = null; mCommandSystem = null; mLayoutManager = null; mAudioManager = null; mGameSceneManager = null; mCharacterManager = null; mSocketManager = null; mKeyFrameManager = null; mGlobalTouchSystem = null; mDllImportExtern = null; mShaderManager = null; mDataBase = null; mCameraManager = null; mResourcesManager = null; mMaterialManager = null; mApplicationConfig = null; mPlayerHeadManager = null; }
public virtual void destroy() { mLayoutPrefabManager.destroy(); mCharacterManager.destroy(); mGameSceneManager.destroy(); mAudioManager.destroy(); mLayoutManager.destroy(); mCommandSystem.destroy(); mKeyFrameManager.destroy(); mGlobalTouchSystem.destroy(); mDllImportExtern.destroy(); mShaderManager.destroy(); mDataBase.destroy(); mCameraManager.destroy(); mPluginUtility.destroy(); mModelManager.destroy(); mResourceManager.destroy(); // 资源管理器必须最后销毁,作为最后的资源清理 mLayoutPrefabManager = null; mResourceManager = null; mBinaryUtility = null; mFileUtility = null; mMathUtility = null; mStringUtility = null; mUnityUtility = null; mPluginUtility = null; mCommandSystem = null; mLayoutManager = null; mAudioManager = null; mGameSceneManager = null; mCharacterManager = null; mKeyFrameManager = null; mGlobalTouchSystem = null; mDllImportExtern = null; mShaderManager = null; mDataBase = null; mCameraManager = null; mModelManager = null; }