public override void OnDestroy() { if (_vsLobby != null && _vsLobby.mDMono != null) { GameObject.Destroy(_vsLobby.mDMono.gameObject); } if (_loader != null) { EB.Assets.UnloadAssetByName("UI3DVsLobby", false); } _vsLobby = null; _loader = null; _isOpen = false; LTHeroBattleEvent.NotifyRefreshChoiceState -= OnNotifyRefreshChoiceState; LTHeroBattleEvent.NotifyChangeChoiceHero -= OnNotifyChangeChoiceHero; LTHeroBattleEvent.NotifyHeroBattleHudFinish -= OnNotifyHeroBattleFinish; if (SceneLogic.SceneState == SceneLogic.eSceneState.DelayCombatTransition) { SceneLogic.SceneState = SceneLogic.eSceneState.RequestingCombatTransition; } base.OnDestroy(); }
protected IEnumerator CreateVsLobby() { if (_vsLobby == null && _loader == null) { _loader = new GM.AssetLoader <GameObject>("UI3DVsLobby", controller.gameObject); yield return(_loader); } if (_loader.Success) { _vsLobby = _loader.Instance.GetMonoILRComponent <UI3DVsLobby>(); _vsLobby.mDMono.gameObject.transform.position = new Vector3(0, 10000, 0); _vsLobby.ConnectorTexture = vsTexture; _isOpen = true; } else { EB.Debug.LogError("CreateVsLobby false "); } }