Example #1
0
 void repDeck()
 {
     foreach (GameObject g in deckObjs)
     {
         cardMovement cardMove = g.GetComponent <cardMovement>();
         if (cardMove != null)
         {
             cardMove.move();
         }
     }
 }
Example #2
0
    public void arrowSuccess()
    {
        //  Debug.Log("Tap success!");

        cardMovement cardMove = deckObjs[0].GetComponent <cardMovement>();

        cardMove.arrowCard();
        deck.RemoveAt(0);
        //  Destroy(deckObjs[0]);
        deckObjs.RemoveAt(0);
        score         += 2;
        scoreText.text = score.ToString();
        moveCards     += 0.2f;
        //addToDeck();
    }
Example #3
0
    IEnumerator tapFail()
    {
        //      Debug.Log("Tap Failure. Game Over!");
        cm.playFail();
        gameplayActive = false;
        stopTimer();
        cardMovement cardMove = deckObjs[0].GetComponent <cardMovement>();

        cardMove.cardWobble();
        au.PlayOneShot(fail, 0.3f);
        yield return(new WaitForSeconds(0.5f));

        gameOut();
        GameObject g = GameObject.FindWithTag("results");

        yield return(new WaitForSeconds(0.75f));

        clearDeck();
        cm.playIdle();
    }
Example #4
0
    public void tapSuccess()
    {
        //       Debug.Log("Tap success!");

        cardMovement cardMove = deckObjs[0].GetComponent <cardMovement>();

        cardMove.destroyCard();
        au.PlayOneShot(tap);
        deck.RemoveAt(0);
        //  Destroy(deckObjs[0]);
        deckObjs.RemoveAt(0);
        score++;
        if (score == gameParameters.requiredScore)
        {
            checkClearance();
        }
        scoreText.text = score.ToString();

        repDeck();
        moveCards += 0.2f;
        addToDeck();
    }