private void CheckWin() { bool won = true; GameObject[] Enemies = GameObject.FindGameObjectsWithTag("Enemy"); for (int i = 0; i < Enemies.Length; i++) { if (Enemies[i].activeSelf == true) { won = false; break; } } if (won == true) { _statManager.CompletedLevel(); } }
////For testing \/ //private void Update() //{ // float hdrIntensity = 1.0f / _maxHealth; // hdrIntensity = hdrIntensity * CurrentHealth; // Color lerpedColor = Color.Lerp(_lowercolour, _highercolour, hdrIntensity); // _material.SetColor("_EmissionColor", lerpedColor); // pointLight.color = lerpedColor; //} private void Death() { _statManager.CompletedLevel(); }