void Update () {
autoReset();
detection ();
//Start the red light of the mine
if(transform.FindChild("Point light"))
{
if(_isNear && !transform.FindChild("Point light").GetComponent<TriggeredLight>().getIsStarting())
{
transform.FindChild("Point light").GetComponent<TriggeredLight>().triggerStart();
}
//end the red light of the mine
else if (!_isNear && transform.FindChild("Point light").GetComponent<TriggeredLight>().getIsStarting())
{
transform.FindChild("Point light").GetComponent<TriggeredLight>().triggerExit();
}
}
}