private void SetHeroPowerInfo(string heroPowerCardID, FullDef def, CardFlair cardFlair) { if (heroPowerCardID.Equals(this.m_heroPowerID)) { EntityDef entityDef = def.GetEntityDef(); if (cardFlair.Premium == TAG_PREMIUM.GOLDEN) { this.m_heroPowerActor.Hide(); this.m_goldenHeroPowerActor.Show(); this.m_goldenHeroPowerActor.SetEntityDef(def.GetEntityDef()); this.m_goldenHeroPowerActor.SetCardDef(def.GetCardDef()); this.m_goldenHeroPowerActor.SetUnlit(); this.m_goldenHeroPowerActor.SetCardFlair(cardFlair); this.m_goldenHeroPowerActor.UpdateAllComponents(); } else { this.m_heroPowerActor.Show(); this.m_goldenHeroPowerActor.Hide(); this.m_heroPowerActor.SetEntityDef(def.GetEntityDef()); this.m_heroPowerActor.SetCardDef(def.GetCardDef()); this.m_heroPowerActor.SetUnlit(); this.m_heroPowerActor.UpdateAllComponents(); } string name = entityDef.GetName(); this.m_heroPowerName.Text = name; string cardTextInHand = entityDef.GetCardTextInHand(); this.m_heroPowerDescription.Text = cardTextInHand; } }
private void DoShowCardRewards(List <string> cardIds, Vector3?finalPosition, Vector3?origin, bool disableFullscreen) { int index = 0; int count = cardIds.Count; foreach (string str in cardIds) { FullDef fullDef = DefLoader.Get().GetFullDef(str, null); GameObject obj2 = AssetLoader.Get().LoadActor(ActorNames.GetHandActor(fullDef.GetEntityDef(), TAG_PREMIUM.NORMAL), false, false); Actor component = obj2.GetComponent <Actor>(); component.SetCardDef(fullDef.GetCardDef()); component.SetEntityDef(fullDef.GetEntityDef()); if (component.m_cardMesh != null) { BoxCollider collider = component.m_cardMesh.GetComponent <BoxCollider>(); if (collider != null) { collider.enabled = false; } } this.m_CurrentCardRewards.Add(component); GameUtils.SetParent(component, this.m_RewardsCardArea, false); this.ShowCardRewardsObject(obj2, finalPosition, origin, index, count); index++; } this.EnableFullscreen(disableFullscreen); }
private void OnHeroPowerDefLoaded(string cardID, FullDef def, object userData) { this.m_heroPowerDef = def; if (this.m_mousedOver) { AssetLoader.Get().LoadActor("History_HeroPower_Opponent", new AssetLoader.GameObjectCallback(this.OnHeroPowerActorLoaded), null, false); } }
public void UpdateDisplay(FullDef def, CardFlair cardFlair) { this.m_heroClass = def.GetEntityDef().GetClass(); this.SetFullDef(def); this.SetClassname(GameStrings.GetClassName(this.m_heroClass)); this.SetClassIcon(this.GetClassIconMaterial(this.m_heroClass)); this.SetBasicSetProgress(this.m_heroClass); this.SetCardFlair(cardFlair); }
public FullDef GetFullDef(string cardId, CardPortraitQuality quality = null) { EntityDef entityDef = this.GetEntityDef(cardId); CardDef cardDef = this.GetCardDef(cardId, quality); FullDef def3 = new FullDef(); def3.SetEntityDef(entityDef); def3.SetCardDef(cardDef); return(def3); }
private void OnHeroPowerFullDefLoaded(string cardID, FullDef def, object userData) { if (this.m_heroPowerActor != null) { this.SetHeroPowerInfo(cardID, def, (CardFlair)userData); } else { base.StartCoroutine(this.SetHeroPowerInfoWhenReady(cardID, def, (CardFlair)userData)); } }
private void OnFullDefLoaded(string cardId, FullDef fullDef, object userData) { if (fullDef == null) { Debug.LogWarning(string.Format("RewardCard.OnFullDefLoaded() - FAILED to load \"{0}\"", cardId)); } else { this.m_entityDef = fullDef.GetEntityDef(); this.m_cardDef = fullDef.GetCardDef(); string handActor = ActorNames.GetHandActor(this.m_entityDef, this.m_cardFlair.Premium); AssetLoader.Get().LoadActor(handActor, new AssetLoader.GameObjectCallback(this.OnActorLoaded), null, false); } }
private void OnFullDefLoaded(string cardId, FullDef fullDef, object userData) { if (fullDef == null) { this.BecomeReady(); UnityEngine.Debug.LogWarning(string.Format("PackOpeningCard.OnFullDefLoaded() - FAILED to load \"{0}\"", cardId)); } else { this.m_entityDef = fullDef.GetEntityDef(); this.m_cardDef = fullDef.GetCardDef(); if (!this.DetermineRarityInfo()) { this.BecomeReady(); } else { string handActor = ActorNames.GetHandActor(this.m_entityDef, this.m_cardFlair.Premium); AssetLoader.Get().LoadActor(handActor, new AssetLoader.GameObjectCallback(this.OnActorLoaded), null, false); } } }
public void SetFullDef(FullDef def) { this.m_fullDef = def; this.UpdatePortrait(); }
private IEnumerator SetHeroPowerInfoWhenReady(string heroPowerCardID, FullDef def, CardFlair cardFlair) { return(new < SetHeroPowerInfoWhenReady > c__Iterator2D { heroPowerCardID = heroPowerCardID, def = def, cardFlair = cardFlair, <$> heroPowerCardID = heroPowerCardID, <$> def = def, <$> cardFlair = cardFlair, <> f__this = this });