public void MoveCard(int cardIndex, CardHolder other, out TweenHolder outTween, bool?visibleDuringTween, int indexToInsertAt = -1) { CardController cardBeingMoved = _Cards[cardIndex]; _Cards.RemoveAt(cardIndex); if (!other._Cards.InsertionIndexIsValid(indexToInsertAt)) { indexToInsertAt = other._Cards.Count; } other.AddCard(cardBeingMoved, indexToInsertAt); cardBeingMoved.ViewFSM.SetAnimState(other._cardsAnimState, performTweens: false); cardBeingMoved.ViewFSM.SetTextVisibility(visibleDuringTween ?? other._cardsTextVisibility); outTween = cardBeingMoved.AddOffsetHeightTween(_cardAnimationData.GeneralCardMoveHeight, other.GetFinalPositionOfCardAtIndex(indexToInsertAt), true) .AddLocalRotationTween(Vector3.one * 360.0f + cardBeingMoved.ViewFSM.GetAnimRotationOffset()) .AddIncrementalScaleTween(cardBeingMoved.ViewFSM.GetAnimScale()) .SetDuration(_cardAnimationData.GeneralCardMoveDuration) .SetShouldChangeLayer(true) .AddToOnFinishedOnce(() => other.OnCardRecieveTweenFinished(cardBeingMoved)); OnCardSent(cardBeingMoved); other.OnCardRecieveTweenBegan(cardBeingMoved); if (CardFlipAudio != null) { CardFlipAudio.Play(); } }