private void CardAnimationFinished(CardBoardPartView _cardTarget) { cardsRotationFinishedCount++; if (cardsRotationFinishedCount == cardsRotateCount) { cardsRotationFinishedCount = 0; cardsRotateCount = 0; if (currentPhaseResult.comboCardList != null && currentPhaseResult.comboCardList.Count > 0) { Debug.LogFormat("GameController::CardAnimationFinished -> COMBO"); SpecialRuleText comboRuleText = Instantiate(comboRuleTextPrefab, uiCanvas.transform); ProcessWonCardsList(currentPhaseResult.comboCardList.Dequeue()); } else { AnimatorFSM.SetTrigger(nextStateTriggerId); } } }
private void PlusRuleState() { Debug.LogFormat("GameController::PlusRuleState"); if (turnResultByPhase.TryGetValue(GamePhase.Plus, out currentPhaseResult)) { foreach (CardOnBoardWon cardWonItem in currentPhaseResult.cardWonList) { Vector2Int cardWonBoardPosition = cardWonItem.card.BoardPosition.Value; CardView targetCardViewItem = selectableAreasList[cardWonBoardPosition.x, cardWonBoardPosition.y].Card; targetCardViewItem.StartShinyAnimation(); } SpecialRuleText plusRuleText = Instantiate(plusRuleTextPrefab, uiCanvas.transform); plusRuleText.OnAnimationFinished += () => { ProcessWonCardsList(currentPhaseResult.cardWonList); }; } else { AnimatorFSM.SetTrigger(nextStateTriggerId); } }