Professional Documents
Culture Documents
Aisenses
Aisenses
using System.Collections;
}
void Update () {
if (CanSee (player)) {
FreakOut();
} else {
exclamationMark.SetActive (false);
}
if (hitInfo.collider.gameObject == target)
{
//it turns true
return true;
}
else
{
//if not then the game continues
//Debug.Log (hitInfo.collider.gameObject.name + " is in the
way ");
return false;
}
} else {
// We didn't hit anything with the ray -- so... the target is too
far away
return false;
}