Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        Timer += Time.deltaTime;
        CheckForDeath wave = gameObject.GetComponent <CheckForDeath>();

        if (nextWave >= Waves.Length - 1 && CheckForDeath.previousWaveDead == true)
        {
            LevelManager level = GameObject.Find("LevelManager").GetComponent <LevelManager>();
            PlayerData.InStage = false;
            level.LoadNextLevel();
        }

        if (Timer > respawnTime[nextWave] && CheckForDeath.previousWaveDead == true)
        // OK M8 SO I WANT U TO HAVE IT SO IF THEYRE DEAD INSTANTLY RESPAWN NEXT ONE OR HAVE A COMPLETED WAVE 1 SCREEN (USE A PUBLIC VOID OR SOMETHNG OK)
        {
            Respawn(Waves[nextWave]);
        }
    }
Esempio n. 2
0
 void Awake()
 {
     access = (access == null) ? this : access;
 }