示例#1
0
        void Update()
        {
            if (!coutingDown)
            {
                return;
            }

            float time = SpawnManager.GetTimeToNextWave();

            if (time > 0)
            {
                //lbSpawnTimer.text="Time to next wave - "+time.ToString("f1")+"s";

                buttonSpawn.lbMain.text = "Spawn (" + time.ToString("f1") + "s)";
                sliderSpawnTimer.value  = SpawnManager.GetTimeToNextWaveRatio();
            }
            else
            {
                buttonSpawn.lbMain.text = "Spawn";
                sliderSpawnTimer.gameObject.SetActive(false);

                //lbSpawnTimer.text="";
                coutingDown = false;
            }
        }