Esempio n. 1
0
        /// <summary>
        /// Auto complete actions in coroutine.
        /// </summary>
        private IEnumerator CompleteCoroutine()
        {
            IsAutoCompleteActive = true;
            HintComponent.UpdateAvailableForAutoCompleteCards();

            while (HintComponent.IsHasHint())
            {
                HintComponent.HintAndSet(HintSetTransitionTime);

                yield return(new WaitWhile(() => HintComponent.IsHintProcess));
            }

            IsAutoCompleteActive = false;
            HintComponent.UpdateAvailableForDragCards();
        }
Esempio n. 2
0
        /// <summary>
        /// Call after each step.
        /// </summary>
        public void ActionAfterEachStep()
        {
            if (!_isUserMadeFirstMove)
            {
                _isUserMadeFirstMove = true;
            }

            SetPackDeckBg();
            GameManagerComponent.CardMove();

            if (AutoCompleteComponent.IsAutoCompleteActive)
            {
                HintManagerComponent.UpdateAvailableForAutoCompleteCards();
            }
            else
            {
                HintManagerComponent.UpdateAvailableForDragCards();
            }

            CheckWinGame();
            CheckActivateAutoComplete();
        }