hi, i corrected my code, it´s a match game, i need that when two of the pieces do not match to wait a certain amount of time for the player to wait and see the other piece that doesnt match, but i cant get it to work
i´m a begginer, i would really appreciate some help, thanks. Sorry for my english, it´s not my first language 
using UnityEngine;
using System.Collections;
public class TileGenerator : MonoBehaviour
{
public int numberOfTiles = 16;
public GameObject[] tileObjects;
GameObject matchOne;
string tileName1;
string[] tName1;
GameObject matchTwo;
string tileName2;
string[] tName2;
RaycastHit hit;
bool canClick = true;
public Vector3[] tileLocations = new Vector3[]
{
new Vector3 (0.0f, 0.0f, 0.0f), new Vector3 (1.5f, 0.0f, 0.0f),
new Vector3 (3.0f, 0.0f, 0.0f), new Vector3 (4.5f, 0.0f, 0.0f),
new Vector3 (0.0f, 1.5f, 0.0f), new Vector3 (1.5f, 1.5f, 0.0f),
new Vector3 (3.0f, 1.5f, 0.0f), new Vector3 (4.5f, 1.5f, 0.0f),
new Vector3 (0.0f, 3.0f, 0.0f), new Vector3 (1.5f, 3.0f, 0.0f),
new Vector3 (3.0f, 3.0f, 0.0f), new Vector3 (4.5f, 3.0f, 0.0f),
new Vector3 (0.0f, 4.5f, 0.0f), new Vector3 (1.5f, 4.5f, 0.0f),
new Vector3 (3.0f, 4.5f, 0.0f), new Vector3 (4.5f, 4.5f, 0.0f),
};
// Use this for initialization
void Start ()
{
Camera.main.transform.position = new Vector3 (2.25f, 2.25f, -8);
for (int i = 0; i<numberOfTiles; i++) {
Instantiate (tileObjects [i], tileLocations [i], Quaternion.identity);
}
}
void Update ()
{
if (canClick == true) {
if (Input.GetButtonDown ("Fire1")) {
Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);
if (Physics.Raycast (ray, out hit, Mathf.Infinity)) {
if (!matchOne) {
revealCardOne ();
} else {
revealCardTwo ();
MatchCheck ();
}
}
}
}
}
void revealCardOne ()
{
matchOne = hit.transform.gameObject;
tileName1 = matchOne.transform.parent.name;
if (matchOne == null) {
print ("No object found!");
} else {
tName1 = tileName1.Split ("_" [0]);
matchOne.transform.eulerAngles = new Vector3 (0.0f, 180.0f, 0.0f);
}
}
void revealCardTwo ()
{
matchTwo = hit.transform.gameObject;
tileName2 = matchTwo.transform.parent.name;
if (tileName1 != tileName2) {
if (matchTwo == null) {
print ("No object found!");
} else {
tName2 = tileName2.Split ("_" [0]);
matchTwo.transform.eulerAngles = new Vector3 (0.0f, 180.0f, 0.0f);
}
}
}
void MatchCheck ()
{
if (tName1 [0] == tName2 [0]) {
canClick = false;
print("Starting " + Time.time);
StartCoroutine(initPos(2.0F));
print("Before WaitAndPrint Finishes " + Time.time);
Destroy (matchOne);
Destroy (matchTwo);
canClick = true;
numberOfTiles = numberOfTiles - 2;
if (numberOfTiles == 0) {
print ("End game");
}
} else {
canClick = false;
print("Starting " + Time.time);
StartCoroutine(initPos(2.0F));
print("Before WaitAndPrint Finishes " + Time.time);
matchOne.transform.eulerAngles = new Vector3 (0.0f, 0.0f, 0.0f);
matchTwo.transform.eulerAngles = new Vector3 (0.0f, 0.0f, 0.0f);
canClick = true;
}
matchOne = null;
matchTwo = null;
if (tileName1 != tileName2) {
StartCoroutine(initPos(2.0F));
}
}
IEnumerator initPos (float waitTime)
{
yield return new WaitForSeconds(waitTime);
print ("WaitAndPrint " + Time.time);
}
}