void variableTime()
    {
        timer           += 1 * Time.deltaTime;
        timeBetweenSpawn = waveSpeed * Mathf.Pow(wavesSpawned, 2) + waitTime;

        if (timeBetweenSpawn <= minTimeBetweenSpawn)
        {
            timeBetweenSpawn = minTimeBetweenSpawn;
        }
        if (timer >= timeBetweenSpawn)
        {
            if (_allWavesForLevel.Count > 0)
            {
                CreateTargetShape(_allWavesForLevel[0]);
                _allWavesForLevel.RemoveAt(0);
            }
            else
            {
                Debug.Log("NEXT LEVEL");
                PlayerProgressSaveAndLoad.SetLevel(Mathf.Max(PlayerProgressSaveAndLoad.GetLevel(), LevelNumber + 1));
                Application.LoadLevel("RoadMap");
            }
        }
    }
    // Update is called once per frame
    void Update()
    {
        foreach (GameObject node in LevelNodes)
        {
            if (PlayerProgressSaveAndLoad.GetLevel() >= node.GetComponent <NodeScript>().LevelNumber)
            {
                node.GetComponent <Image>().color = new Color(1, 1, 1, 1);
            }
            else
            {
                node.GetComponent <Image>().color = new Color(1, 1, 1, 0.5f);
            }

            if (node.GetComponent <NodeScript>().LevelNumber == currentLevel)
            {
                if (shakeEnable)
                {
                    node.GetComponent <ShakeNo>().DoShake();
                    shakeEnable = false;
                }

                if (PlayerProgressSaveAndLoad.GetLevel() < currentLevel)
                {
                    print("you have not unlocked " + currentLevel);
                    currentLevel--;
                    shakeEnable = true;
                }
                CurrentLevelNode = node;
                node.GetComponent <BreatheScript>().enabled = true;
            }
            else
            {
                node.GetComponent <BreatheScript>().enabled = false;
            }
            if (PlayerProgressSaveAndLoad.GetLevel() < currentLevel)
            {
            }

            /*if (node.GetComponent<NodeScript>().LevelNumber == currentLevel + 1 && currentLevel < maxLevel)
             * {
             * NextLevelNode = node;
             * }
             * if (node.GetComponent<NodeScript>().LevelNumber == currentLevel - 1 && currentLevel > minLevel)
             * {
             * PreviousLevelNode = node;
             *
             * }*/
        }

        transform.position = new Vector3(Mathf.Lerp(transform.position.x, CurrentLevelNode.transform.position.x, speed),
                                         Mathf.Lerp(transform.position.y, CurrentLevelNode.transform.position.y, speed), transform.position.z);

        //when pillo 1 shaked
        if (Input.GetKeyDown(KeyCode.A))
        {
            PreviousNode();
            Debug.Log("previousnodeinvoked");
        }

        //when pillo 2 shaked
        if (Input.GetKeyDown(KeyCode.D))
        {
            NextNode();
            Debug.Log("nextnodeinvoked");
        }

        //when both pillo's pressed
        if (Input.GetKeyDown(KeyCode.W))
        {
            SelectCurrentNode();
            Debug.Log("selected");
        }
    }