/// <summary> /// Update the AOI of the finder. /// </summary> public virtual void UpdateAOI() { if ((transform.position - oldPos).magnitude > 2) { AOIManager.UpdateAOI(this); oldPos = transform.position; } }
/// <summary> /// Remove the target from the targets list /// </summary> protected virtual void OnDisable() { AOIManager.RemoveTarget(this); }
/// <summary> /// Add the target to the targets list /// </summary> protected virtual void OnEnable() { AOIManager.AddTarget(this); }
/// <summary> /// Remove the finder from the list /// </summary> public virtual void OnDisable() { AOIManager.RemoveFinder(this); }
/// <summary> /// Add the finder to the list /// </summary> public virtual void OnEnable() { AOIManager.AddFinder(this); }