IEnumerator checkMove() { yield return new WaitForSeconds(.3f); //Cek jika tile nya tidak sama kembalikan, jika ada yang sama panggil DestroyMatches if (otherTile != null) { if (!isMatched && !otherTile.GetComponent<Tiles>().isMatched) { GameManager.instance.combo = 1; otherTile.GetComponent<Tiles>().row = row; otherTile.GetComponent<Tiles>().column = column; row = previousRow; column = previousColumn; } else { grid.DestroyMatches(); GameManager.instance.combo++; } } otherTile = null; }
IEnumerator CheckMove() { yield return(new WaitForSeconds(.5f)); if (otherTile != null) { if (!isMatched && !otherTile.GetComponent <Tile>().isMatched) { otherTile.GetComponent <Tile>().row = row; otherTile.GetComponent <Tile>().column = column; row = previousRow; column = previousColumn; GameManager.instance.scoreMultiplier = 1; } else { grid.DestroyMatches(); } } otherTile = null; }