private void Awake() { s_instance = this; AssetLoader.Get().LoadActor((UniversalInputManager.UsePhoneUI == null) ? "DeckPickerTray" : "DeckPickerTray_phone", delegate(string name, GameObject go, object data) { if (go == null) { Debug.LogError("Unable to load DeckPickerTray."); } else { this.m_deckPickerTray = go.GetComponent <DeckPickerTrayDisplay>(); if (this.m_deckPickerTray == null) { Debug.LogError("DeckPickerTrayDisplay component not found in DeckPickerTray object."); } else { GameUtils.SetParent(this.m_deckPickerTray, this.m_deckPickerTrayContainer, false); this.m_deckPickerTray.SetHeaderText(GameStrings.Get(!FriendChallengeMgr.Get().IsChallengeTavernBrawl() ? "GLOBAL_FRIEND_CHALLENGE_TITLE" : "GLOBAL_TAVERN_BRAWL")); this.m_deckPickerTray.Init(); this.DisableOtherModeStuff(); NetCache.Get().RegisterScreenFriendly(new NetCache.NetCacheCallback(this.OnNetCacheReady)); MusicManager.Get().StartPlaylist(!FriendChallengeMgr.Get().IsChallengeTavernBrawl() ? MusicPlaylistType.UI_Friendly : MusicPlaylistType.UI_TavernBrawl); } } }, null, false); }
public override void Unload() { base.Unload(); FriendlyDisplay.Get().Unload(); }
private void OnDestroy() { s_instance = null; }