예제 #1
0
    private IEnumerator CheckPotentialMatches()
    {
        yield return(new WaitForSeconds(GameVariables.WaitBeforePotentialMatchesCheck));

        potentialMatches = MatchChecker.GetPotentialMatches(marbles);

        if (potentialMatches != null)
        {
            while (true)
            {
                AnimatePotentialMatchesCoroutine = MatchChecker.AnimatePotentialMatches(potentialMatches);
                StartCoroutine(AnimatePotentialMatchesCoroutine);
                yield return(new WaitForSeconds(GameVariables.WaitBeforePotentialMatchesCheck));
            }
        }
    }
    private IEnumerator CheckPotentialMatches()
    {
        // Wait delay before showing potential matches
        yield return(new WaitForSeconds(GameVariables.WaitBeforePotentialMatchesCheck));

        // get any potential matches
        potentialMatches = MatchChecker.GetPotentialMatches(candies);

        // if we have matches
        if (potentialMatches != null)
        {
            // animate them until the player takes their turn
            while (true)
            {
                AnimatePotentialMatchesCoroutine = MatchChecker.AnimatePotentialMatches(potentialMatches);

                StartCoroutine(AnimatePotentialMatchesCoroutine);

                // Wait delay before showing potential matches
                yield return(new WaitForSeconds(GameVariables.WaitBeforePotentialMatchesCheck));
            }
        }
    }
예제 #3
0
    private IEnumerator CheckPotentialMatches()
    {
        yield return(new WaitForSeconds(GameVariables.WaitBeforematchCheck));

        potentialMatches = MatchChecker.GetPotentialMatches(candyArray).ToList <GameObject>();
    }