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