private void UpdateLayoutImpl(int slotMousedOver, int overrideCardCount)
    {
        int num = 0;

        if ((((this.lastMousedOver != slotMousedOver) && (this.lastMousedOver != -1)) && ((this.lastMousedOver < base.m_cards.Count) && (base.m_cards[this.lastMousedOver] != null))) && this.CanAnimateCard(base.m_cards[this.lastMousedOver]))
        {
            Card card = base.m_cards[this.lastMousedOver];
            iTween.Stop(card.gameObject);
            if (!this.enemyHand)
            {
                Vector3 mouseOverCardPosition = this.GetMouseOverCardPosition(card);
                Vector3 cardPosition          = this.GetCardPosition(card, overrideCardCount);
                card.transform.position         = new Vector3(mouseOverCardPosition.x, this.centerOfHand.y, cardPosition.z + 0.5f);
                card.transform.localScale       = this.GetCardScale(card);
                card.transform.localEulerAngles = this.GetCardRotation(card);
            }
            card.NotifyMousedOut();
            GameLayer cardRaycast = GameLayer.Default;
            if ((base.m_Side == Player.Side.OPPOSING) && SpectatorManager.Get().IsSpectatingOpposingSide())
            {
                cardRaycast = GameLayer.CardRaycast;
            }
            SceneUtils.SetLayer(card.gameObject, cardRaycast);
        }
        float delaySec = 0f;

        for (int i = 0; i < base.m_cards.Count; i++)
        {
            Vector3 vector3;
            Card    card2 = base.m_cards[i];
            if (!this.CanAnimateCard(card2))
            {
                continue;
            }
            num++;
            float z = !this.m_flipHandCards ? 354.5f : 534.5f;
            card2.transform.rotation = Quaternion.Euler(new Vector3(card2.transform.localEulerAngles.x, card2.transform.localEulerAngles.y, z));
            float num5 = 0.5f;
            if (this.m_handMoving)
            {
                num5 = 0.25f;
            }
            if (this.enemyHand)
            {
                num5 = 1.5f;
            }
            float           num6            = 0.25f;
            iTween.EaseType easeOutExpo     = iTween.EaseType.easeOutExpo;
            float           transitionDelay = card2.GetTransitionDelay();
            card2.SetTransitionDelay(0f);
            ZoneTransitionStyle transitionStyle = card2.GetTransitionStyle();
            card2.SetTransitionStyle(ZoneTransitionStyle.NORMAL);
            switch (transitionStyle)
            {
            case ZoneTransitionStyle.SLOW:
                easeOutExpo = iTween.EaseType.easeInExpo;
                num6        = num5;
                break;

            case ZoneTransitionStyle.VERY_SLOW:
                easeOutExpo = iTween.EaseType.easeInOutCubic;
                num6        = 1f;
                num5        = 1f;
                break;

            case ZoneTransitionStyle.NORMAL:
                goto Label_0265;
            }
            card2.GetActor().TurnOnCollider();
Label_0265:
            vector3 = this.GetCardPosition(card2, overrideCardCount);
            Vector3 cardRotation = this.GetCardRotation(card2, overrideCardCount);
            Vector3 cardScale    = this.GetCardScale(card2);
            if (i == slotMousedOver)
            {
                easeOutExpo = iTween.EaseType.easeOutExpo;
                if (this.enemyHand)
                {
                    num6 = 0.15f;
                    float num8 = 0.3f;
                    vector3 = new Vector3(vector3.x, vector3.y, vector3.z - num8);
                }
                else
                {
                    float num9 = 0.5f * i;
                    num9 -= (0.5f * base.m_cards.Count) / 2f;
                    float selectCardScale = (float)this.m_SelectCardScale;
                    float num11           = (float)this.m_SelectCardScale;
                    cardRotation = new Vector3(0f, 0f, 0f);
                    cardScale    = new Vector3(selectCardScale, cardScale.y, num11);
                    card2.transform.localScale = cardScale;
                    num5 = 4f;
                    float num12 = 0.1f;
                    vector3 = this.GetMouseOverCardPosition(card2);
                    float x = vector3.x;
                    if (this.m_handEnlarged)
                    {
                        vector3.x = Mathf.Max(vector3.x, this.m_enlargedHandCardMinX);
                        vector3.x = Mathf.Min(vector3.x, this.m_enlargedHandCardMaxX);
                    }
                    card2.transform.position         = new Vector3((x == vector3.x) ? card2.transform.position.x : vector3.x, vector3.y, vector3.z - num12);
                    card2.transform.localEulerAngles = new Vector3(0f, 0f, 0f);
                    iTween.Stop(card2.gameObject);
                    easeOutExpo = iTween.EaseType.easeOutExpo;
                    if (CardTypeBanner.Get() != null)
                    {
                        CardTypeBanner.Get().Show(card2.GetActor());
                    }
                    InputManager.Get().SetMousedOverCard(card2);
                    bool    showOnRight    = card2.GetActor().GetMeshRenderer().bounds.center.x < base.GetComponent <BoxCollider>().bounds.center.x;
                    float?  overrideScale  = null;
                    Vector3?overrideOffset = null;
                    KeywordHelpPanelManager.Get().UpdateKeywordHelp(card2, card2.GetActor(), showOnRight, overrideScale, overrideOffset);
                    SceneUtils.SetLayer(card2.gameObject, GameLayer.Tooltip);
                }
            }
            else if (this.GetStandIn(card2) != null)
            {
                CardStandIn standIn = this.GetStandIn(card2);
                iTween.Stop(standIn.gameObject);
                standIn.transform.position = vector3;
                if (!card2.CardStandInIsInteractive())
                {
                    standIn.DisableStandIn();
                }
                else
                {
                    standIn.EnableStandIn();
                }
            }
            card2.EnableTransitioningZones(true);
            string    tweenName = ZoneMgr.Get().GetTweenName <ZoneHand>();
            object[]  args      = new object[] { "scale", cardScale, "delay", transitionDelay, "time", num6, "easeType", easeOutExpo, "name", tweenName };
            Hashtable hashtable = iTween.Hash(args);
            iTween.ScaleTo(card2.gameObject, hashtable);
            object[]  objArray2  = new object[] { "rotation", cardRotation, "delay", transitionDelay, "time", num6, "easeType", easeOutExpo, "name", tweenName };
            Hashtable hashtable2 = iTween.Hash(objArray2);
            iTween.RotateTo(card2.gameObject, hashtable2);
            object[]  objArray3  = new object[] { "position", vector3, "delay", transitionDelay, "time", num5, "easeType", easeOutExpo, "name", tweenName };
            Hashtable hashtable3 = iTween.Hash(objArray3);
            iTween.MoveTo(card2.gameObject, hashtable3);
            float[] values = new float[] { delaySec, transitionDelay + num5, transitionDelay + num6 };
            delaySec = Mathf.Max(values);
        }
        this.lastMousedOver = slotMousedOver;
        if (num > 0)
        {
            base.StartFinishLayoutTimer(delaySec);
        }
        else
        {
            base.UpdateLayoutFinished();
        }
    }
 private void Awake()
 {
     s_instance = this;
 }
 private void OnDestroy()
 {
     s_instance = null;
 }
 private bool CheckCriticalAssetLoads()
 {
     if (!this.m_criticalAssetsLoaded)
     {
         if (Board.Get() == null)
         {
             return(false);
         }
         if (BoardCameras.Get() == null)
         {
             return(false);
         }
         if (BoardStandardGame.Get() == null)
         {
             return(false);
         }
         if (GameMgr.Get().IsTutorial() && (BoardTutorial.Get() == null))
         {
             return(false);
         }
         if (MulliganManager.Get() == null)
         {
             return(false);
         }
         if (TurnStartManager.Get() == null)
         {
             return(false);
         }
         if (TargetReticleManager.Get() == null)
         {
             return(false);
         }
         if (GameplayErrorManager.Get() == null)
         {
             return(false);
         }
         if (EndTurnButton.Get() == null)
         {
             return(false);
         }
         if (BigCard.Get() == null)
         {
             return(false);
         }
         if (CardTypeBanner.Get() == null)
         {
             return(false);
         }
         if (TurnTimer.Get() == null)
         {
             return(false);
         }
         if (CardColorSwitcher.Get() == null)
         {
             return(false);
         }
         if (RemoteActionHandler.Get() == null)
         {
             return(false);
         }
         if (ChoiceCardMgr.Get() == null)
         {
             return(false);
         }
         if (InputManager.Get() == null)
         {
             return(false);
         }
         this.m_criticalAssetsLoaded = true;
         this.ProcessQueuedPowerHistory();
     }
     return(true);
 }