public NetworkManager() { CommandHelper.Init(); mTcpService = new TcpService(); mTcpService.ConnectSucceedHandle = OnConnectSucceedHandle; mTcpService.ConnectFailedHandle = OnConnectFailHandle; mTcpService.DisConnectedHandle = OnDisConnectHandle; GameModuleManager.CreateModule <EventManager>(); mEventManager = GameModuleManager.GetModule <IEventManager>(); }
public void Destroy() { mIsInited = false; mIsDestroyed = true; if (mGameObejct) { GameObject.Destroy(mGameObejct); mGameObejct = null; IResourcesManager tmpResMgr = GameModuleManager.GetModule <IResourcesManager>(); tmpResMgr.UnLoadBundleByType(EABType.UI, BundleName); } }
internal async Task LoadWindowAsync() { IResourcesManager tmpResMgr = GameModuleManager.GetModule <IResourcesManager>(); await tmpResMgr.LoadBundleByTypeAsync(EABType.UI, BundleName); if (mIsDestroyed) { tmpResMgr.UnLoadBundleByType(EABType.UI, BundleName); return; } InitWindow(tmpResMgr.GetAssetByType <GameObject>(EABType.UI, BundleName)); if (mIsShowAfterLoaded) { Show(); } }