예제 #1
0
 public void Show()
 {
     this.m_shown = true;
     base.SetEnabled(true);
     base.GetComponent <Collider>().enabled = true;
     if (this.m_actor != null)
     {
         bool show = false;
         if (this.m_visualType == CollectionManagerDisplay.ViewMode.CARDS)
         {
             string    cardId    = this.m_actor.GetEntityDef().GetCardId();
             CardFlair cardFlair = this.m_actor.GetCardFlair();
             show = CollectionManagerDisplay.Get().ShouldShowNewCardGlow(cardId, cardFlair);
             if (!show)
             {
                 CollectionManager.Get().MarkAllInstancesAsSeen(cardId, cardFlair);
             }
         }
         else if ((this.m_visualType != CollectionManagerDisplay.ViewMode.HERO_SKINS) && (this.m_visualType == CollectionManagerDisplay.ViewMode.CARD_BACKS))
         {
         }
         this.ShowNewItemCallout(show);
         this.m_actor.Show();
         ActorStateType stateType = !show ? ActorStateType.CARD_IDLE : ActorStateType.CARD_RECENTLY_ACQUIRED;
         this.m_actor.SetActorState(stateType);
         Renderer[] componentsInChildren = this.m_actor.gameObject.GetComponentsInChildren <Renderer>();
         if (componentsInChildren != null)
         {
             foreach (Renderer renderer in componentsInChildren)
             {
                 renderer.shadowCastingMode = ShadowCastingMode.Off;
             }
         }
         EntityDef entityDef = this.m_actor.GetEntityDef();
         if (entityDef != null)
         {
             string     tag  = "FakeShadow";
             string     str3 = "FakeShadowUnique";
             GameObject obj2 = SceneUtils.FindChildByTag(this.m_actor.gameObject, tag);
             GameObject obj3 = SceneUtils.FindChildByTag(this.m_actor.gameObject, str3);
             if (CollectionManager.Get().IsCardInCollection(entityDef.GetCardId(), this.m_actor.GetCardFlair()))
             {
                 if (entityDef.IsElite())
                 {
                     if (obj2 != null)
                     {
                         obj2.GetComponent <Renderer>().enabled = false;
                     }
                     if (obj3 != null)
                     {
                         obj3.GetComponent <Renderer>().enabled = true;
                     }
                 }
                 else
                 {
                     if (obj2 != null)
                     {
                         obj2.GetComponent <Renderer>().enabled = true;
                     }
                     if (obj3 != null)
                     {
                         obj3.GetComponent <Renderer>().enabled = false;
                     }
                 }
             }
             else
             {
                 if (obj2 != null)
                 {
                     obj2.GetComponent <Renderer>().enabled = false;
                 }
                 if (obj3 != null)
                 {
                     obj3.GetComponent <Renderer>().enabled = false;
                 }
             }
         }
     }
 }