using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class EnemFollower : MonoBehaviour {
	void OnTriggerEnter(Collider other){
		if(other.name == "killZone"){
			SceneManager.LoadScene(0);
		} else if(other.name == "presenceZone"){
			GetComponent<AudioSource>().Play();
		}
	}
	void OnTriggerExit(Collider other){
		if(other.name == "presenceZone"){
			GetComponent<AudioSource>().Pause();
		}
	}
}
