public void selectCard(CardBase card){ if (firstCard == null) { firstCard = card; firstCard.isSelected = true; previewCard (card); }else{ if (firstCard.GetInstanceID () != card.GetInstanceID ()) { secondCard = card; previewCard (card); gameState = GameState.Result; Debug.Log ("result"); //if (firstCard.checkPair (card)) { // firstCard.isPaired=card.isPaired=true; // secondCard = card; // previewCard (card); // gameState = GameState.Result; // isMatch = true; //} else { // isMatch = false; // previewCard (card); // firstCard.isSelected = card.isSelected = false; // firstCard = null; //} } } }