protected override void Awake() { base.Awake(); base.SetEnabled(false); this.m_buttonText.Text = (SceneMgr.Get().GetMode() != SceneMgr.Mode.TAVERN_BRAWL) ? GameStrings.Get("GLUE_COLLECTION_NEW_DECK") : string.Empty; UIBScrollableItem component = base.GetComponent <UIBScrollableItem>(); if (component != null) { component.SetCustomActiveState(new UIBScrollableItem.ActiveStateCallback(this.IsUsable)); } }
private void Awake() { if (this.m_deckBox != null) { this.m_deckBox.transform.localPosition = CollectionDeckBoxVisual.POPPED_DOWN_LOCAL_POS; this.m_deckBox.transform.localScale = new Vector3(0.95f, 0.95f, 0.95f); this.m_deckBox.transform.localEulerAngles = new Vector3(90f, 180f, 0f); } this.m_wasTouchModeEnabled = UniversalInputManager.Get().IsTouchMode(); UIBScrollableItem component = base.GetComponent <UIBScrollableItem>(); if (component != null) { component.SetCustomActiveState(new UIBScrollableItem.ActiveStateCallback(this.IsDeckBoxShown)); } }
protected override void Awake() { base.Awake(); string name = (UniversalInputManager.UsePhoneUI == null) ? "DeckCardBar" : "DeckCardBar_phone"; GameObject obj2 = AssetLoader.Get().LoadActor(name, false, false); if (obj2 == null) { Debug.LogWarning(string.Format("DeckTrayDeckTileVisual.OnDeckTileActorLoaded() - FAILED to load actor \"{0}\"", name)); } else { this.m_actor = obj2.GetComponent <CollectionDeckTileActor>(); if (this.m_actor == null) { Debug.LogWarning(string.Format("DeckTrayDeckTileVisual.OnDeckTileActorLoaded() - ERROR game object \"{0}\" has no CollectionDeckTileActor component", name)); } else { GameUtils.SetParent((Component)this.m_actor, (Component)this, false); this.m_actor.transform.localEulerAngles = new Vector3(0f, 180f, 0f); UIBScrollableItem component = this.m_actor.GetComponent <UIBScrollableItem>(); if (component != null) { component.SetCustomActiveState(new UIBScrollableItem.ActiveStateCallback(this.IsInUse)); } this.SetUpActor(); if (base.gameObject.GetComponent <BoxCollider>() == null) { this.m_collider = base.gameObject.AddComponent <BoxCollider>(); this.m_collider.size = this.BOX_COLLIDER_SIZE; this.m_collider.center = this.BOX_COLLIDER_CENTER; } this.Hide(); SceneUtils.SetLayer(base.gameObject, LAYER); base.SetDragTolerance(5f); } } }