Exemplo n.º 1
0
    void Update()
    {
        //isGameStart =

        if (cardMaker.TotalCardCount / 2 == cardComparator.Score && cardMaker.TotalCardCount != 0)
        {
            //print(cardMaker.totalCardCount / 2);
            cardMaker.RefillGrid(cardComparator.Score + 1);
        }
    }
Exemplo n.º 2
0
 private void OnButtonClick()
 {
     if (IsOnInput() && isPressed)
     {
         lerp      = true;
         timer     = 0;
         isClicked = true;
         EnableButtons(thisScreen, false);
         if (startNewGame)
         {
             cardMaker.TotalCardCount = 0;
             cardMaker.RefillGrid(newGameCardPair);
             cardComparator.Score = 0;
             cardComparator.Moves = newGameMoves;
         }
     }
     else
     {
         isPressed = false;
     }
     (renderer as SpriteRenderer).sprite = spriteIdle;
 }