// Update is called once per frame
    void Update()
    {
        if (spawnDelay > 0)
        {
            currentSpawnTime -= Time.deltaTime;
        }


        if (waveNum >= 5 && ((EnemiesToSpawnT0[waveNum] + EnemiesToSpawnT1[waveNum]) <= 0 && totalActiveEnemies <= 0))
        {
            uiControl.WaveNumText.color = new Color(0, 0, 0, (1.0f));
            uiControl.WaveNumText.text  = "You Win";
            //WaveNumText.color = new Color(0, 0, 0, (waveTime / waveTimmer));\
            uiControl.SetHelpfulTips("Hit 'Space' to Reset");

            if (Input.GetKeyDown(KeyCode.Space))
            {
                uiControl.SetHelpfulTips("");
                SceneManager.LoadScene("Test01");
            }
        }



        if ((EnemiesToSpawnT0[waveNum] + EnemiesToSpawnT1[waveNum]) > 0 || totalActiveEnemies > 0)
        {
            SpawnWave(enemyTypes, EnemySpawns1, spawnDelay, EnemiesToSpawnT0[waveNum], EnemiesToSpawnT1[waveNum]);
        }
        else if (waveNum >= 5)
        {
            //do nothing
        }
        else
        {
            //Debug.Log("wave advance");

            uiControl.SetHelpfulTips("Hit 'Enter' to Advance Wave");

            if (Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Return))
            {
                waveNum++;
                audioS.Play();
                uiControl.TriggerWave();
                uiControl.SetHelpfulTips("");
            }
        }

        if (playerDead)
        {
            uiControl.SetHelpfulTips("Hit 'Space' to Reset");

            if (Input.GetKeyDown(KeyCode.Space))
            {
                uiControl.SetHelpfulTips("");
                SceneManager.LoadScene("Test01");
            }

            /*
             * if (Input.GetKeyDown(KeyCode.KeypadEnter) || Input.GetKeyDown(KeyCode.Return))
             * {
             *  uiControl.SetHelpfulTips("");
             *  SceneManager.LoadScene("Test01");
             * }
             *
             *
             * if (Input.GetKeyDown(KeyCode.O))
             * {
             *  uiControl.SetHelpfulTips("");
             *  SceneManager.LoadScene("Test01");
             * }
             */
        }
    }