// Use this for initialization
    void Start()
    {
        level = GameObject.Find("LevelController").GetComponent <LevelControllerScript> ();
        cam   = GameObject.Find("Main Camera").GetComponent <Camera> ();

        matchedButtons    = 0;
        state             = 0;
        generatedSequence = level.retrieveStringValue(simonSequenceVariable);
        Debug.Log("Generated seq: " + generatedSequence);
        if (generatedSequence == null)
        {
            generatedSequence = "";
        }
        if (generate)
        {
            if (generatedSequence.Equals(""))
            {
                generateSequence();
            }
            //state = 1;
        }
        for (int i = 0; i < button.Length; ++i)           // propagate level & controller & misc reference
        {
            button [i].level       = level;
            button [i].controller  = this;
            button [i].buttonId    = i;
            button [i].playerInput = !generate;
            button [i].cam         = cam;
        }
    }
    new void Update()
    {
        if (exit == false)
        {
            return;
        }
        if (isWaitingForActionToComplete)
        {
            return;
        }

        if (framesElapsed == 0)
        {
            //cameraGrab.grab ();
            Graphics.Blit(whiteTex, rt);
        }
        framesElapsed++;
        if (framesElapsed == 3)
        {
            string returnLocation = level.retrieveStringValue("ReturnLocation");
            level.loadScene(returnLocation);
        }
    }