New Level (Scene) after Enemies are gone

Hey my name is Jason and i am new to Unity
I am making a small Arena Game were you have to kill a lot of enemies in different levels.
If you kill all enemies in “Level1” you should get to “Level2”. I am searching for a script that can automaticcaly change the Level if all of “Enemy” “Enemy2” and “Enemy3” are gone.
Can somebody please help me?

C# :

bool nextLevel;

void Update()
{
    nextLevel = true;
    foreach(Collider co in Physics.OverlapSphere(Vector3 position, float radius))
    {
       if(co.gameObject.tag == "Enemy")
       {
          nextLevel = false;
       }
    }
    
    if(nextLevel)
    {
       Application.LoadLevel(int levelIndex);
    }
}

Physics.OverlapSphere will cast a sphere collider and return all colliders in the area. Make sure radius is big enough to return all possible enemies’ collider and enemies have the tag “Enemy”. Position value better be somewhere in the middle.

JS version :

 var nextLevel : boolean;
    
 function Update()
 {
     nextLevel = true;
     foreach(Collider co in Physics.OverlapSphere(position : Vector3, radius : float))
     {
        if(co.gameObject.tag == "Enemy")
        {
           nextLevel = false;
        }
     }
        
     if(nextLevel)
     {
        Application.LoadLevel(levelIndex : int);
     }
 }