// Use this for initialization
    void Start()
    {
        AddMessageHandlers();

        player = GameObject.FindObjectOfType <Player> ();

        if (player == null)
        {
            GameObject playerGameObj = GameObject.FindGameObjectWithTag(Tags.Player);

            if (playerGameObj != null)
            {
                player = playerGameObj.GetComponent <Player> ();
            }
            else
            {
                Debug.LogWarning("No player object found in scene!");
            }
        }

        if (player)
        {
            playerStartPosition = player.transform.position;
        }

        tileGenerator = GetComponent <TileGenerator> ();

        if (tileGenerator == null)
        {
            tileGenerator = GameObject.FindObjectOfType <TileGenerator> ();
        }

        // generate the initial layout
        if (tileGenerator != null)
        {
            tileGenerator.GenerateTileLayout(float.MaxValue);
        }

                #if UNITY_EDITOR || UNITY_EDITOR_OSX || UNITY_EDITOR_64
        PlayerPrefs.DeleteAll();
                #endif

        DisableParticles();

        if (skyboxMaterials != null && skyboxMaterials.Length > 0)
        {
            RenderSettings.skybox = skyboxMaterials [Random.Range(0, skyboxMaterials.Length)];
        }

        StartCoroutine(GetHighScoresWWW());

        Messenger <string> .Broadcast(UIManager.MSG_SET_NOTIFICATION, "Tap to begin", MessengerMode.DONT_REQUIRE_LISTENER);
    }