Example #1
0
    private void CheckWin()
    {
        gameWon = true;

        foreach (GridTile tile in GridTile.All())
        {
            if (tile.state == TileState.OFF)
            {
                gameWon = false;


                break;
            }
        }

        if (gameWon)
        {
            //start each tile's die animation.
            foreach (GridTile tile in GridTile.All())
            {
                tile.BeginEndGameAnimation();
            }


            PlayerRecord.instance.TryUpdateBestCount();
        }
    }